Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Retrieve Data from SQL database Programatically using Excel VBA
I've got some Excel Spreadsheets that I need to convert to text files. In
addition to the conversion, I'd like to retrieve the customer name for a particular part number from our SQL Server database when I do the conversion. I've written a VBA program that reads the rows in the spreadsheet, massages the data as I need it to be massaged and then writes the data to a CSV file for import into another application. What I'd like to know is, is there any way that I take the part number from each row in the spreadsheet and then do a lookup in a SQL Server database to get the customer for that part number. In the VBA code, I'd have a variable that contains the part number and then I'd have to do a select where the variable containing the part number equals the part number in the database table. Is there any code on the net that might show me how to get started? If it's any help, the database name is oes, the table name is partmap and the field name for the part number is qc_no and the field name for the customer is customer_no. TIA Ernie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Retrieve data from excel database | Excel Discussion (Misc queries) | |||
Can an Excel query retrieve information from AS400 database? | Excel Programming | |||
Can an Excel query retrieve information from AS400 database? | Excel Programming | |||
programatically retrieve selected rows from excel workbook | Excel Programming | |||
Programatically retrieve a list of public functions. | Excel Programming |