Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Express database (Standalone ?)
Message
 
 
To
23/08/2007 06:23:05
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01249055
Message ID:
01249797
Views:
16
Sorry but I don't do VB.

>Thanks for your reply. but I try to use your method, there is some error occured.
>This is my connection string.
> Dim DataDirectory As String = "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data"
>
> Dim con As SqlClient.SqlConnection = New SqlClient.SqlConnection("workstation id=DTS-1;packet size=4096;Data Source=localhost\sqlexpress;Initial Catalog=; Integrated Security=True; AttachDBFileName = '" & DataDirectory & "\DTS_AIR_DTTN.mdf'")
>
>I am sure that I have set up the database on that directory, however, when I try to compile the program, this error occured:
>
>Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DTS_AIR_DTTN.mdf". Operating system error 32: "32(error not found)".
>An attempt to attach an auto-named database for file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\DTS_AIR_DTTN.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
>
>Thank you very much!
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform