Computing.Net > Forums > Programming > List Databses is Visual Basic 6

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

List Databses is Visual Basic 6

Reply to Message Icon

Name: Deon
Date: August 2, 2007 at 07:51:49 Pacific
OS: Windows 2000
CPU/Ram: 1 Ghz
Product: Mecer
Comment:

Hi everyone.

Need your help. I Am creating a Windows application in Visual basic 6 that writes data into SQL database. My login Form that firstly show when running the app is frmLogin. I have Got a combobox call cboDSNList. I want, When clicking the Combobox to show all available Databases available to choose from. At the momement I have to type in the database I want to connect to. Please help me with the right code....

Here is My Code. Thanks in Advance!!

**************************

Private Sub cboDSNList_Change()

End Sub

Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOK_Click()


sDSN = cboDSNList.Text 'DSN name
sUser = txtUID.Text 'User Id
sPassword = txtPWD.Text 'Password

If sDSN = "" Or sUser = "" Then
MsgBox "Please enter all values!"
Else
--------
' Call function that login into
' Maximizer using MaAccess object
--------
If CreateMaHostObject = False Then
MsgBox "Invalid UserID or Password, connection to Address Book has failed", vbOKOnly, "MaAccess Example"
Exit Sub
End If
frmHardwareEntry.Show

Unload Me
End If
End Sub

Private Sub Form_Activate()
txtUID.SetFocus

End Sub



Sponsored Link
Ads by Google

Response Number 1
Name: ninethsense
Date: August 13, 2007 at 01:35:33 Pacific
Reply:

May be this link from my blog will help you http://blog.ninethsense.com/sql/how...

PraVeeN
blog.ninethsense.com


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: List Databses is Visual Basic 6

visual basic 6 www.computing.net/answers/programming/visual-basic-6/11343.html

Problem In Visual Basic 6.0. www.computing.net/answers/programming/problem-in-visual-basic-60/9842.html

Unable to view forms in Visual Basic 6 www.computing.net/answers/programming/unable-to-view-forms-in-visual-basic-6/1487.html