|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to connect to databaseI created a database using vb express 2005 and now am trying to access it using a sql connection.
Here is the connection string: ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security Info=True;" When I try to debug, it gives a sqlexception error saying it cant open the database due to login failure. I thought using SSPI would force it into windows authentication but I am doing something wrong. Can anyone help? Noob,
You can try to make a connectionstring included in the Data tab. Cor <noob> schreef in bericht Show quoteHide quote news:44863576$0$26864$88260bb3@free.teranews.com... >I created a database using vb express 2005 and now am trying to access it >using a sql connection. > Here is the connection string: > ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data > Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security > Info=True;" > > When I try to debug, it gives a sqlexception error saying it cant open the > database due to login failure. I thought using SSPI would force it into > windows authentication but I am doing something wrong. Can anyone help? > > > > > -- > Posted via a free Usenet account from http://www.teranews.com > Shouldn't the connection string have been something like :
ConnString = "Data Source= .\SQLEXPRESS; AttachDbFilename=|Data Directory|\trail-db.mdf; Initial Catalog=<MyDatabase>; Integrated Security=True;Persist Security Info=True;" Regards, Cerebrus. Cor Ligthert [MVP] wrote: Show quoteHide quote > Noob, > > You can try to make a connectionstring included in the Data tab. > > Cor > > <noob> schreef in bericht > news:44863576$0$26864$88260bb3@free.teranews.com... > >I created a database using vb express 2005 and now am trying to access it > >using a sql connection. > > Here is the connection string: > > ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data > > Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security > > Info=True;" > > > > When I try to debug, it gives a sqlexception error saying it cant open the > > database due to login failure. I thought using SSPI would force it into > > windows authentication but I am doing something wrong. Can anyone help? > > > > > > > > > > -- > > Posted via a free Usenet account from http://www.teranews.com > > Cerebrus
Can be but this can even be more than enough, but this can in my idea not be the problem. "Server=.\SQLExpress; DataBase=HKW; Integrated Security=SSPI" Cor Show quoteHide quote "Cerebrus" <zorg***@sify.com> schreef in bericht news:1149679943.121665.187150@i39g2000cwa.googlegroups.com... > Shouldn't the connection string have been something like : > > ConnString = "Data Source= .\SQLEXPRESS; AttachDbFilename=|Data > Directory|\trail-db.mdf; Initial Catalog=<MyDatabase>; Integrated > Security=True;Persist Security Info=True;" > > Regards, > > Cerebrus. > > Cor Ligthert [MVP] wrote: > >> Noob, >> >> You can try to make a connectionstring included in the Data tab. >> >> Cor >> >> <noob> schreef in bericht >> news:44863576$0$26864$88260bb3@free.teranews.com... >> >I created a database using vb express 2005 and now am trying to access >> >it >> >using a sql connection. >> > Here is the connection string: >> > ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data >> > Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security >> > Info=True;" >> > >> > When I try to debug, it gives a sqlexception error saying it cant open >> > the >> > database due to login failure. I thought using SSPI would force it into >> > windows authentication but I am doing something wrong. Can anyone help? >> > >> > >> > >> > >> > -- >> > Posted via a free Usenet account from http://www.teranews.com >> > > Cerebrus wrote:
Show quoteHide quote > Shouldn't the connection string have been something like : Thanks Cerebrus & Cor> > ConnString = "Data Source= .\SQLEXPRESS; AttachDbFilename=|Data > Directory|\trail-db.mdf; Initial Catalog=<MyDatabase>; Integrated > Security=True;Persist Security Info=True;" > > Regards, > > Cerebrus. > > Cor Ligthert [MVP] wrote: > > >>Noob, >> >>You can try to make a connectionstring included in the Data tab. >> >>Cor >> >><noob> schreef in bericht >>news:44863576$0$26864$88260bb3@free.teranews.com... >> >>>I created a database using vb express 2005 and now am trying to access it >>>using a sql connection. >>>Here is the connection string: >>>ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data >>>Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security >>>Info=True;" >>> >>>When I try to debug, it gives a sqlexception error saying it cant open the >>>database due to login failure. I thought using SSPI would force it into >>>windows authentication but I am doing something wrong. Can anyone help? >>> >>> >>> >>> >>>-- >>>Posted via a free Usenet account from http://www.teranews.com >>> > > Changing it to AttachDbFilename corrected the problem. Kinda off topic but if I develop an application that uses SQL Express
database's, then any user's machine trying to run the applicaiton must also have SQL Express installed to run...is this correct? -- Show quoteHide quoteDennis in Houston "Cerebrus" wrote: > Shouldn't the connection string have been something like : > > ConnString = "Data Source= .\SQLEXPRESS; AttachDbFilename=|Data > Directory|\trail-db.mdf; Initial Catalog=<MyDatabase>; Integrated > Security=True;Persist Security Info=True;" > > Regards, > > Cerebrus. > > Cor Ligthert [MVP] wrote: > > > Noob, > > > > You can try to make a connectionstring included in the Data tab. > > > > Cor > > > > <noob> schreef in bericht > > news:44863576$0$26864$88260bb3@free.teranews.com... > > >I created a database using vb express 2005 and now am trying to access it > > >using a sql connection. > > > Here is the connection string: > > > ConnString = "Data Source= .\SQLEXPRESS;Initial Catalog = |Data > > > Directory|\trail-db.mdf;Integrated Security=SSPI;Persist Security > > > Info=True;" > > > > > > When I try to debug, it gives a sqlexception error saying it cant open the > > > database due to login failure. I thought using SSPI would force it into > > > windows authentication but I am doing something wrong. Can anyone help? > > > > > > > > > > > > > > > -- > > > Posted via a free Usenet account from http://www.teranews.com > > > > > No, it has to be installed on one users machine or on a machine all the
users can get to. BTW, I am the Access Developer's Workshop SIG leader at HAL-PC. We are holding a hands-on lab for SQL Express this Saturday from 9 am - noon. You are invited to attend. Check www.hal-pc.org for directions. Robert also in Houston Dennis wrote: Show quoteHide quote > Kinda off topic but if I develop an application that uses SQL Express > database's, then any user's machine trying to run the applicaiton must also > have SQL Express installed to run...is this correct? > -- > Dennis in Houston
Why Me? (Instead of Form1)
How do I increment a byte with out casting? Capturing mouse events (Mouse up and down on the desktop) Loading CrystalReports.rpt, I Am Asked To Enter Login ID And Password How to walk through InnerExceptions? Threading in .Net... Cancel Constructor (Me = Nothing) Edit Mode Parent child binding question RichTextBox in Vs2005 Vb.Net shows unformatted RTF |
|||||||||||||||||||||||