Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 22nd, 2006, 05:31 AM
Registered User
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default db connection string

hi, I'm kind of new to this. Trying to learn asp.net 2.0. Have been designing a website, and, so far so good, I can deploy the files, but I can't get the synthax right for the connection string. in my web.config file the connection string works on the local computer, but I can't figure out how to change the data source part:

  <add name="Database2ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Docu ments and Settings\Alexi\My Documents\Delivery\web\App_Data\Database2.mdf&quot ;;Integrated Security=True;Connect Timeout=30;User Instance=True"
   providerName="System.Data.SqlClient" />

the the wrox book says I have to have the|datadirectory|
does it mean I have to write the full http address on the server?
and I can't figure out what to substitute in for the ".\sqlexpress" part...

my host has ms sql server 2000 and my sql. I asked for their support and the gave me a weird looking connection string and claimed that it worked...

<%@ LANGUAGE = JScript %>
<% var oConn;
oConn = Server.CreateObject("ADODB.Connection");
oConn.Mode = 3
oConn.Open("Provider=SQLOLEDB;Server= ;Database=alexeyka_yah_1951com_;UID=support;PWD=te st123;");

Would really appreciate any help, perhaps buy a new book from the programmers in gratitude. :)

Old October 5th, 2006, 05:25 AM
Registered User
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

that's cool. guys at ASP.NET really helped me out. recommend to everyone.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql OLE DB Connection String oranginalab Classic ASP Databases 9 September 4th, 2016 08:40 AM
db connection dfeuerborn VB Databases Basics 1 August 19th, 2005 02:08 PM
db connection dfeuerborn Excel VBA 1 August 19th, 2005 02:24 AM
db connection dfeuerborn Access VBA 1 August 17th, 2005 10:33 AM
DB Connection stu9820 ASP.NET 1.0 and 1.1 Basics 1 September 26th, 2004 09:01 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.