ODBC connection trough Visual Basic in Excel 2003

C

Cato Larsen

Hey guys!
I've searched the forum a bit for an answer to this, but none of the
questions asked so far would give an answer to my question. So here goes!

How do you connect to a database, in this case REMEDY trough an AR Ssytem
ODBC Data Source, query the database for a table and grab everything in the
selected columns from X date to Y date into a defined worksheet?

It's setup in the ODBC sourceadmin with the following info:

Data Source Name: AR System ODBC Data Source
AR Server: REMEDY
Username: myUsername
Password: (blank)

Options: Replace '.' in object names is checked.


The table that should be queried for the info is called "HDQueries" and only
10 of the columns in the table are needed, the sheets name is "DataDump" and
the insert will start at A1 and go on til it's done.

One of the issues I'm having is that I can't store my username and password
in the code. A dialog of sorts must pop-up with a request for a valid
username and password for the connection. The second is that I'm a bit over
my head on how to program this. ^_^ I have rudamentary VB skills, so if
someone can help me trough this, the rest should be somewhat easier. :)

All help are welcome!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top