Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help with an Excel connection string to MSSql

Status
Not open for further replies.

beetlebailey

Programmer
Jan 4, 2005
51
US
I have an Excel worksheet, (Sheet1) that I want to copy the data in cells B3:B12 into a SQL database named VPD. I am using Excel to pull data from SQL thru an ODBC connection to the remote server and it works quite well. I cannot seem to get a handle on the correct connection string and open it in the VBA worksheet to the remote SQL server to perform the SQL update command.
SQL server=Administrator, System DSN=VPD, Database=VPD
Thanks so much.
 
Do you want to copy the excel sheet into your DB then run an update? Is that the question?
 
I want Excel VBA to open a connection to SQL, then perform an update of the data contained in cells B3:B12 to the SQL database VPD then close the connection.
 
How about pulling in the values from the spread sheet into a table and using that table to update the other table? Then drop the first table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top