ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to perform SQL INSERT from vbs script (https://www.excelbanter.com/excel-programming/412250-how-perform-sql-insert-vbs-script.html)

Siegfried Heintze

How to perform SQL INSERT from vbs script
 
Woops, I forgot a question in my last post.

http://www.activexperts.com/activmon...soffice/excel/
has a great little VBS script. I tried to enhance it to perform an SQL
insert statement. See my other recent post for the listing that includes my
attempt on lines 33-38. It did not work. No error message!

Can I expect SQL INSERT/DELETE/UDPATE statements to work with Excel?

Thanks,
Siegfried



NateBuckley

How to perform SQL INSERT from vbs script
 
The following SQL statement works for me and is an insert

strSQL = "INSERT INTO tblEmployees [fldClockNo], [fldName] VALUES '" &
ClockNo & "', '" & name & "'"

Quite hard to make out the single quote characters but that works.

"Siegfried Heintze" wrote:

Woops, I forgot a question in my last post.

http://www.activexperts.com/activmon...soffice/excel/
has a great little VBS script. I tried to enhance it to perform an SQL
insert statement. See my other recent post for the listing that includes my
attempt on lines 33-38. It did not work. No error message!

Can I expect SQL INSERT/DELETE/UDPATE statements to work with Excel?

Thanks,
Siegfried





All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com