>Hi again.
>
>Since I couldn't get the SQL passthrough to work, I moved the code into a stored procedure, which is ok because I'm gonna need this SP anyway.
>
>Here is the calling code:
>
> m.ErrorMsg = ""
> m.sqlcmd = "Execute dbo.InsertMaster "
> m.param1 = "?m.cat, ?m.diff, ?m.alc, ?m.keyword, ?m.keyword2, ?m.correctresp, ?m.script, ?m.stem, "
> m.param2 = "?ALLTRIM(m.respa), ?ALLTRIM(m.respb), ?ALLTRIM(m.respc), ?ALLTRIM(m.respd), ?m.scripttime, "
> m.param3 = "?m.testtype, ?m.itmnum, ?m.cb, ?m.cd, ?m.rb, ?m.rd, ?m.completed, ?m.wtavgmea, ?m.error, ?m.wtavginfit, ?m.wtavgoutft, ?m.pbiscrl, "
> m.param4 = "?m.pa, ?m.pb, ?m.pc, ?m.pd, ?m.subbank,?@ErrorMsg"
>
> ms1 = SQLEXEC(mconn, m.sqlcmd + m.param1 + m.param2 + m.param3 + m.param4)
> IF !EMPTY(m.ErrorMsg)
> =MESSAGEBOX(m.ErrorMsg, 16)
> endif
>
>
>This is in a scan loop.
>
>The first time through everything runs with no errors reported, but no insert. The second time it comes back and tells me it can't find 'dbo.InsertMaster'.
>
>If I run the SP on it's own and hand enter the data elements, it works just peachy. This is a little crazy making and I'm starting to enjoy beating my head against this brick wall.
>
>Again, what am I missing? I wouldn't be bothering y'all so much, but we have no DBA here, nor do we have anyone with any experience programming with anything outside of Access.
>
>Thanks
>Dorris
What is your SQL Server version? Are you able to run SQL Server Profiler and examine what you're sending to SQL Server?
Also, are you connected to the right database?
If it's not broken, fix it until it is.
My Blog