Other option is connect with ODBC and perform querys from VB.
Example of connection and query:
'This will fill a listbox with a list of domains
In a module you must define:
Public conn As Connection
Public rs As Recordset
In a form adds a listbox and the following code:
Private Sub Form_Load()
Set rs = New Recordset
Set conn = New Connection
conn.ConnectionString = "Provider=MSDASQL.1;Password=<password>;Pers ist Security Info=True;User ID=<user>;Data Source=TDORASERVER"
rs.Open "select distinct domain_name from QCSITEADMIN_DB.PROJECTS", conn
While Not rs.EOF
- TDORASERVER should be defined as ODBC
- Where <user> and <password> Assign a valid user name and password.
I prefer using the OTA, since this makes it possible to select the correct database for you, the Query command Patterson is talking about will automatically use all of the right information once your connected.
Be warned though that you have full rights on the database your working on, some ICT guys might get nervous on you if you use it!
My tips: create "views" on the database and use those since they are read only [img]/images/graemlins/wink.gif[/img]