5 Replies - 68393 Views - Last Post: 30 March 2010 - 02:42 AM Rate Topic: -----

#1 kghosh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 23-April 08

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

Post icon  Posted 23 April 2008 - 03:01 AM

please help me how to write code for connection vb.net to sql server database in standalone system.
Is This A Good Question/Topic? 1

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

#2 jjsaw5  Icon User is offline

  • I must break you
  • member icon

Reputation: 90
  • View blog
  • Posts: 3,060
  • Joined: 04-January 08

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

Posted 23 April 2008 - 05:04 AM

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.
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

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

Posted 23 April 2008 - 08:11 AM

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:

Thanks :)
Was This Post Helpful? 0
  • +
  • -

#4 kghosh  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 23-April 08

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

Posted 23 April 2008 - 08:46 PM

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)
Was This Post Helpful? 0
  • +
  • -

#5 Guest_Shahriar Nour Khondokar*


Reputation:

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

Posted 29 March 2010 - 08:28 AM

The resource at this location: Embedding SQL in C# and Java describes how to connect to SQL Server database from C#.NET database applications as well as Java database applications. But you may find it helpful for VB applications too. It also describes how to pass embedded SQL queries, call stored procedures, pass parameters etc.

View Postkghosh, on 23 April 2008 - 02:01 AM, said:

please help me how to write code for connection vb.net to sql server database in standalone system.

Was This Post Helpful? 0

#6 motcom  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 290
  • View blog
  • Posts: 1,371
  • Joined: 16-June 08

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

Posted 30 March 2010 - 02:42 AM

Hi,

I am sure you are missing something here:

"connectionstring ="data source =sql express; uid=; password-; initial catalog ="master" "

like a username, datasource, password and database - initial catalog...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1