O'Connor, Patricia
Patricia.O'Connor at DFA.STATE.NY.US
Fri Mar 19 15:45:36 CST 2004
Hi all I am attempting to set up a job stream in VBA. The first example works fine strSql = "INSERT INTO TBL_EXPFSDT (EXPFS_BASE_DT)" strSql = strSql & " VALUES (TO_DATE('" & dtNew & "', 'MM/DD/YYYY'))" cmd.CommandText = strSql cmd.ActiveConnection = cnn cmd.CommandType = adCmdText cmd.Execute lngAffected, , adExecuteNoRecords Then next step is to execute a stored passthru query named q01aCreateNycFsTable the following does not work Set cmd = New ADODB.Command cmd.ActiveConnection = cnn cmd.CommandText = "q01aCreateNycFsTable" cmd.CommandType = adCmdStoredProc cmd.Execute lngAffected, , adExecuteNoRecords This is driving me nuts, I have tried several other combinations. I have other queries I wish to do the same thing but do not want to have to string out like in first example - TOO long. How do I run an access query using ADO or do I have to use DAO. Thanks