Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL 2005 express edition connection

Author  Topic 

al73
Starting Member

7 Posts

Posted - 2008-02-25 : 13:06:08
I just recieved an ASP script with SQL mdf file and I just installed the SQL 2005 express edition. I'm running it in mix mode (don't even undarstend what it means). The script works with the connection string pointing to the developers site.

connStr= "Provider=SQLOLEDB;Data Source=sql385.mysite.com;User Id=myID;Password=myPass; Initial Catalog=hra;"

I got a table called hra_DATA.mdf and a log which i was able to attach to them from the Microsoft SQL Server Management Studio Express panel.

How can i configure the connection to work with my server.
My servername and instance is MTL-SRV100\SRV100

Thanks to all

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-25 : 13:08:59
you need to change datasource: to new server and database
Go to Top of Page

al73
Starting Member

7 Posts

Posted - 2008-02-25 : 13:17:48
What is the correct datasource. I have very limit knowledge of SQL servers
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-25 : 13:46:33
Data source should be MTL-SRV100\SRV100. By the way, hra_DATA.mdf is db data file not table.
Go to Top of Page

al73
Starting Member

7 Posts

Posted - 2008-02-25 : 16:11:40
I changed it to
connStr= "Provider=SQLOLEDB;Data Source=MTL-SRV100\SRV100;Trusted_Connection=yes;MARS_Connection=yes; Initial Catalog=hra;"

Microsoft OLE DB Provider for SQL Server error '80040e37'
Invalid object name 'Config'.
/asp/HRA/config.inc, line 10
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-25 : 16:20:32
www.connectionstrings.com



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

al73
Starting Member

7 Posts

Posted - 2008-02-25 : 16:23:45
That where i got it from
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-25 : 16:30:42
Provider=SQLNCLI;Server=[MTL-SRV100]\SRV100;Database=hra;Trusted_Connection=yes;MarsConn=yes;



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-25 : 16:33:44
quote:
Originally posted by al73

Invalid object name 'Config'.
This indicates you have not declared your Config variable.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

laura1980
Starting Member

2 Posts

Posted - 2008-02-26 : 05:06:00
I am new on sql server.My question is :I want to connect the Visual basic 2005 Express edition with SQL server 2005 devoloper edition but seems that something is wrong with connection .Does anybody now can I make this connection ,are they compatibile???
PLS help me!!!
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-26 : 21:17:34
Yes you can. Did you read above responses?
Go to Top of Page
   

- Advertisement -