Wednesday, March 28, 2012

Help on setting up connection string

I'm using VWD on SQL2005EXPRESS And i keep getting a connection string error

Can someone show me how to put a connection string in the web.config, or which connection string to use to connect to my host database which they're running SQL2000..

Thanks Newbie

Seehttp://www.connectionstrings.com.|||

I did went to that site, and i have try some their method and it didn't work. i still get a error

I'd like to see what the web.config file suppose to look like with the connection string written in it

|||<?xml version="1.0" ?>
<configuration>
<connectionStrings>
<add name="MyConnectionString" connectionString="server=(local)\SQLSERVEREXPRESS_INSTANCENAME;database=MyDatabase;uid=myusername;password=mypassword" />
</connectionStrings>
</configuration>|||

This is my web.config file.Could you please tell me what is the problem with it.

Thanks Newbie

<?xmlversion="1.0"?>

<configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<system.web>

<customErrorsmode="ON"/>

<compilationdebug="true" />

<tracelocalOnly="false"mostRecent="true"pageOutput="true" />

<roleManagerenabled="true"/>

<authenticationmode="Forms"/>

</system.web>

</configuration>

|||If you compare it to mine, you'll notice you're missing the connectionStrings element as well as a connection string.|||

Ok" i have seen the different. But how do i know which elemet and connection string to use . I have seen some many different connection string and element . So how do one detemine which one to use for their website and database.

I'm using SQL 05 EXPRESS and my host is using SQL 2000, so how would i know which string and element to use.? I' m new to this ,so some of the terms and language i dont understand.

|||The connection string I used in an example above will work for SQL Server Express. When using SQL Server Express, you have to name the instance (i.e. (local)\SQLEXPRESS). With SQL Server 2000, you should be fine without naming the instance as long as there are not multiple instances of SQL Server on the box (i.e. (local)).|||

One more thing. I did attemp to do scott configure on changing SQL express to SQL2000 or 2005 and i did settup up vwd to appservicedb.

Is there a way, to see if i'm running SQL express or SQL server 2005 express?

O, k if i'm running SQL EXPRESS i could use the string above and it would work?

Thanks you

|||

Just have question.How do i determine what my instance is?

And in your connection string i 'd put my database name where it stated my database, and for my (local)\SQLEXPRESS). INSTANCE how do i know what to put for the instance?

No comments:

Post a Comment