Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 SubPrivate Sub cmdOK_Click()
sDSN = cboDSNList.Text 'DSN name
sUser = txtUID.Text 'User Id
sPassword = txtPWD.Text 'PasswordIf 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.ShowUnload Me
End If
End SubPrivate Sub Form_Activate()
txtUID.SetFocusEnd Sub

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

![]() |
![]() |
![]() |

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