deharris2003
Programmer
I am trying to run a query in Access that will update an SQL table, Which I know I can do. Problem is the query always asking for the DSN. It is my inderstanding that if I run the Query in VBA then I can code the ADODB connection string. I know how to do this in ASP but VBA is different. Here is what have already and it does not work. Any help is much appreciated.
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=data1;UID=DBS_TEMP;PWD=DBS_TEMP"
strSQL = "DELETE FROM db
nline_Media " & _
"WHERE db
nline_Media.IDX_HP_ID = '184'"
Conn.Execute (strSQL)
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=data1;UID=DBS_TEMP;PWD=DBS_TEMP"
strSQL = "DELETE FROM db
"WHERE db
Conn.Execute (strSQL)