Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,082 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,791 people online right now. Registration is fast and FREE... Join Now!




" How connect vb.net to sql server database in local system"

 
Reply to this topicStart new topic

" How connect vb.net to sql server database in local system"

kghosh
23 Apr, 2008 - 02:01 AM
Post #1

New D.I.C Head
*

Joined: 23 Apr, 2008
Posts: 2

please help me how to write code for connection vb.net to sql server database in standalone system.
User is offlineProfile CardPM
+Quote Post

jjsaw5
RE: " How Connect Vb.net To Sql Server Database In Local System"
23 Apr, 2008 - 04:04 AM
Post #2

I must break you
Group Icon

Joined: 4 Jan, 2008
Posts: 1,633



Thanked: 8 times
Dream Kudos: 125
My Contributions
have you tried writing it yourself? We aren't just going to write your code for you.

And we are going to need a lot more information if you want us to help you. My suggestion is to try it yourself and then post the code so we can take a look at it along with any error messages you receive. And we'll go from there.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: " How Connect Vb.net To Sql Server Database In Local System"
23 Apr, 2008 - 07:11 AM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks smile.gif
User is offlineProfile CardPM
+Quote Post

kghosh
RE: " How Connect Vb.net To Sql Server Database In Local System"
23 Apr, 2008 - 07:46 PM
Post #4

New D.I.C Head
*

Joined: 23 Apr, 2008
Posts: 2

Actuallly, I am writing a code to in vb.net for login and password in vb.net and database sql server express edition but it is in windows authentication mode i unable to change to sql server mode. Here below is my code :


Dim connectionstring as string
connectionstring ="data source =sql express; uid=; password-; initial catalog ="master"
dim cn as sqlconnection = new sqlconnection(connectionstring)
dim cmd as new sqlcommand()
dim d as new dataset
cmd.connection = cn
cmd.commandtext = " insert into detals values(@userid,@passward)"
cmd.commandtext= commandtype.text
cn.close()

I am getting the error "Login failed for user "xyz". The user is not associated with trusted sql server connention ( Mircosoft sql server, Error:18452)



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:34PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month