Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Insert not working why?
Message
From
05/09/2012 14:50:20
 
 
To
05/09/2012 14:17:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Miscellaneous
Thread ID:
01552421
Message ID:
01552435
Views:
51
Yeah, I know - and when I get to the REAL code, it'll be in a stored procedure that will be called with parameters. This is code for moving the data from VFP to MSSQL and will (hopefully) only have to be run once. I'm having to convert from a 'less than optimal' original design (bad design! no design cookies!) and moving data from multiple tables into one table and correct usage of key words as field names.

But if I can't get this flippin' insert to work, I'm kinda hosed.


>If Mike Yearwood saw this, you'd get a lecture about sql injection ...
>
>
>>Hi gang
>>
>>I have the following code/commands
>>
>>
>> msql1 = "Insert dli_testing..CATMaster (Category, DiffLetter, alc, Keyword, Keyword2, CorrectResp," + ;
>>    + "Script, Stem, RespA, RespB, RespC, RespD, ScriptTime, TestType, OrigItmId, EnterDate, Completed)" + ;
>>    + " Values ('" + m.cat + "', '" + m.diff + "', '" +  m.alc + "', '" + m.keyword + "', '" +  m.keyword2 + "', '" +  m.correctresp + "', '" ; 
>>    + m.script + "', '" +  m.stem + "', '" +  ALLTRIM(m.respa) + "', '" +  ALLTRIM(m.respb) + "', '"   ;
>>    + ALLTRIM(m.respc) + "', '" +  ALLTRIM(m.respd) + "', '" +  m.scripttime + "', '";
>>    +  m.testtype + "','" + m.itmnum + "','" + DTOC(m.enterdate) + "', '" +  m.completed + "')"
>>ms1 = SQLEXEC(mconn,msql1)
>>
>>
>>It returns no error and no rows affected.
>>
>>What am I missing?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform