Relatively new to SQL. Need help please.
Get Run-Time error message at cmd.Execute "CHARACTERS FOUND AFTER END OF SQL STATEMENT". I am trying to write a compound SQL statement and then use NextRecordset method to look at one recordset then the other.
I'm taking this right out of MSDN but can't make it work.
cmd.ActiveConnection = ado
cmd.CommandText = "SELECT * FROM BASSWAGE;SELECT * FROM BASSEARN" (all on one line)
cmd.CommandType = adCmdText
Set adoRsEvaluateWage = cmd.Execute
Debug.Print adoRsEvaluateWage!WAGENAME
Set adoRsEvaluateWage = adoRsEvaluateWage.NextRecordset
Debug.Print adoRsEvaluateWage!EMPNO
Thank You for any help
TNN, Tom
TNPAYROLL@AOL.COM
TOM
Get Run-Time error message at cmd.Execute "CHARACTERS FOUND AFTER END OF SQL STATEMENT". I am trying to write a compound SQL statement and then use NextRecordset method to look at one recordset then the other.
I'm taking this right out of MSDN but can't make it work.
cmd.ActiveConnection = ado
cmd.CommandText = "SELECT * FROM BASSWAGE;SELECT * FROM BASSEARN" (all on one line)
cmd.CommandType = adCmdText
Set adoRsEvaluateWage = cmd.Execute
Debug.Print adoRsEvaluateWage!WAGENAME
Set adoRsEvaluateWage = adoRsEvaluateWage.NextRecordset
Debug.Print adoRsEvaluateWage!EMPNO
Thank You for any help
TNN, Tom
TNPAYROLL@AOL.COM
TOM