Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does this make sense?
Message
 
To
31/01/2013 17:02:47
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Desktop
Miscellaneous
Thread ID:
01564885
Message ID:
01564902
Views:
38
>>>Right now, I'm testing from the VFP command window so the code looks like (after variables are assigned a value)
>>>
>>>msql1 = "Execute InsertTestResults "
>>>m.param1 = "?m.sbank, ?m.scn, ?m.tcn"
>>>ms1 = sqlexec(mconn, msql1 + m.param1)
>>>
>>>
>>>mconn = SQLStringConnect(SQLCStr) where
>>>SQLCSTR = "Driver = SQL Server;Server = DEVSERVER;uid = 'Herbie';Trusted_Connection = Yes;APP=Microsoft Visual FoxPro; WSID = PC1; Database = DLI_Testing"
>>>
>>>yes, the connection is good.
>>>
>>>InsertTestResults is basically, after parameters are defined
>>>
>>>Insert into TestResult (Subbank, SCN, TCN) values ('E0' + @Subbank, @SCN, @TCN)
>>
>>Is there a foreign key in Testresult (pointing to IndvStats) that you are violating?
>
>No, no foreign key - besides, wouldn't that generate a 'violated key' error?

Yes - it should.

3 suggestions..

Try giving the user dbo rights and see if the problem persists (if not - rights issue).

Use SQL Profiler in SSMS to see what you are actually sending to the server.

Try doing an insert from SSMS query window filling in the appropriate parameters. If that works, you aren't passing parameters you think you are.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform