Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 3rd, 2005, 09:15 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to Pubs DB on SQL server..easy !!!

Hi every1...
im new to programming so xcuse my dumbness
im doing beginning VB.net 2003ch16, the DataBase Programming with SQL server.
ive downloaded and installed SQL server, its running in my task bar. i
have xp. i set a password when SQL srv installed, through a command
prompt. My xp pc is called "HPPC"
SQL server is installed on the same pc as vb.net 2003 professional.

im trying to run the 'dataset example' try it out, i think i have
problems with this parameter:

Dim objConnection As SqlConnection = New _
SqlConnection("server=(local);database=pubs;user id=sa;password=")

Please tell me:
do i have to change these values with my own username and password?
also, where IS the pubs database? is it in vb.net already or in SQL server?
Hope u guys can help!

Reply With Quote
  #2 (permalink)  
Old January 7th, 2005, 02:39 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Don't excuse !
We've all been new to programming not so long ago !

Take a first step:

If you run visual studio:
You have a server explorer window, probably to the left of the screen. There you can try to connect to the databases installed. Your server's name is probably either "(local)", "(local)\the name of your instance of MSDE" ie: "(local)\MYMSDE" or "(the name of your PC)\(the name of your instance)" ie: "MYMACHINE\MYMSDE". Use windows integrated security. If you get the server name right, you can see the databases in the combobox below. You can also test the connection. From there it is much easier to help you with the connectionstring

Reply With Quote
  #3 (permalink)  
Old January 12th, 2005, 03:40 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmm..thanks for the reply:)
i know the name of the server, it is listed in the server window..its 'hppc' .
how do i change this line:
Dim objConnection As SqlConnection = New_
SqlConnection("server=(local);database=pubs;user id=sa;password=")

and make it use integrated security?


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting existing program to SQL Express DB jscammell VB Databases Basics 2 April 19th, 2007 02:03 PM
URGENT:Connecting SQL server through Proxy server abhowal SQL Server 2000 3 November 30th, 2005 03:22 AM
connecting web server and remote db server via asp moreyt Classic ASP Databases 0 May 31st, 2005 12:13 AM
Connecting to a DB from another server... dungey PHP Databases 1 May 7th, 2004 11:13 AM
connecting to SQL DB through a domain janeprime2001 C# 2 April 22nd, 2004 07:21 AM



All times are GMT -4. The time now is 06:50 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.