| Author |
Topic |
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 15:11:35
|
| Hello all,Please help me as i am not able to connect to my databaseI have my databse in datab directoryand this is my connection string<add name="Connstrmy" connectionString="my server ; AttachDbFilename="datadirectory\test.mdf";uid=username; pwd=passowrd;"providerName="System.Data.SqlClient" /> hosting people have said that I am using uid and password for databse and not of server.i have to add user id and password for server alsohow do i do that? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-06 : 15:13:45
|
| http://www.connectionstrings.com/?carrier=sqlserver2005Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 16:02:43
|
| hi i have seen that site but not able to get one correct con string for myself.how do i add server user id and password ?and is my contring wrong?when i use it on my local comp it works fine// changing server name and removing uid and pwd |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-06 : 16:05:24
|
| Why haven't you posted your error?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 16:43:30
|
| here is the errorCannot open database "test.mdf" requested by the login. The login failed.Login failed for user 'gophotool.com'. |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 16:48:42
|
| i have been tring to search all kinds of help but not able to get any asnwer for the same. i have been given 2 user id and password 1 for sql server and one for databasewhen i use sql server user id and password it thriws error that login failed for user (username)but when i manually login to sql server there is one databse for me with a different name (blank) in my connection string when i give name of that databse this conneciton string works perfectly only werro i get is becasue of tbale name which is not available in the databse( on sql server created by my host for me) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-06 : 16:49:59
|
| Your error has nothing to do with your connection string. Do you have enough permissions to modify the default database of "username"? If not, ask your host to fix it.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 16:52:37
|
| sir,i have asked for the same but they reply check your code problem is with your code you only using databse username and password you should use server username and passwordbut i will once again request them for the samethankyou for your instant help |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-06 : 17:00:18
|
| Sir for your reference this is the reply i got for this error from myhost1: u can't create any database inside 1 database, if u need more Db, then let us know2: gophotool.com : it's having purely coding issuePlease check ur coding once..u can contact any of ur dynamic developer for this DB error in coding |
 |
|
|
onlinenovice
Starting Member
7 Posts |
Posted - 2008-05-07 : 08:38:17
|
| no help sir they suggested me to contact dynamic developer ( sarcastic remark)and they still believe that its connecion string problem and no problem at their end.can you please suggest that how do i create .sql file for my databse with backup of all the data in itfrom sql server management 9 express editionwhen i right click on my data file>> tak generate script.a script is generated without data of my database but sql server does not recognize dbo keyword which is in the script.please help me if you know of free utility which cn create databse script and its backup.thankyou very very much for all your help |
 |
|
|
|