Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with running mdf file in an application

Status
Not open for further replies.

sup919

Programmer
Jan 10, 2002
31
TH
hi there got a problem to ask regarding sqlserver
i ve written an application that use sqlserver as a database but with the installation machine it does not have any sqlserver on to it . i was wondering how would i come about to run the application properly .. is it possible to run it with out installing any sqlserver ?
many regards
sun
 
You will have to code in the application to connect to the sql server you want.
 
Thanks u but how do i come about it currently i m connecting using this command :

dim dbcon as New SqlConnection

dbCon.ConnectionString = "workstation id=WIN2006;packet size=4096;integrated security=SSPI;initial catalog=" & _
"Psychology;persist security info=False"

many thanks
sun
 
You'll have to change the workstaion ID, initial catalog etc to connect to what server and db you want. Also SSPI is integrated secturity, meaning it will use your windows login info. If that is not what you want, then you will have to remove that and specify a username and password.

Check here for more help on syntax

 
hi i ve try that with this connection and it gives me error
"can not create childlist for field School"
This are the connection string that i ve change to

dbCon.ConnectionString = " AttachDBFilename = C:\mahidolProject\Psychology_Data.MDF;packet size=4096;integrated security=SSPI;initial catalog=" & _
"Psychology;persist security info=False"

so is it to do with connection userid ?
many thanks
sun
 
Hi Sun,

See this post:

So you really have to have SQL Server running to use the data in a supported environment.

To connect to the SQL instance with SSPI:

PROVIDER=SQLOLEDB;SERVER=MySQLServerInstanceName;DATABASE=Psychology;Integrated Security=SSPI;

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
I'll have the roast duck with the mango salsa.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top