>>>>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?
>>
>>SQL 10, how would I do that?
>>
>>Yes, the connection is good and is to the correct DB
>
>Post the result of this query
> SELECT @@Version,
> SERVERPROPERTY('Edition') AS Edition,
> SERVERPROPERTY('ProductVersion') AS ProductVersion,
> SERVERPROPERTY('ProductLevel') AS ProductLevel
>
>If you're using version other than Express, go to Tools Menu in SSMS, SQL Server Profiler. Run the trace right before testing your procedure. Don't forget to pause/stop trace once done using the pause/stop buttons in the Run Trace dialog.
Version: 2008R2
Edition: Standard
ProdVers: 10.50.1600.1
Level: RTM
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place