Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve data from excel database Vanya Noble Excel Discussion (Misc queries) 0 November 12th 09 12:51 AM
Can an Excel query retrieve information from AS400 database? BeginningprogrammerLisa Excel Programming 0 September 22nd 05 04:11 PM
Can an Excel query retrieve information from AS400 database? BeginningprogrammerLisa Excel Programming 0 September 22nd 05 04:04 PM
programatically retrieve selected rows from excel workbook talktobatchu Excel Programming 0 June 1st 05 10:15 PM
Programatically retrieve a list of public functions. Alan Howells Excel Programming 4 October 21st 03 02:28 PM


All times are GMT +1. The time now is 03:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"