Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Communicate with access
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00972392
Message ID:
00972679
Views:
12
Peter,

No problem. But anyway I nee3d aerror(aa) information.

Try first:
?sqlexec(gnConnHandle,"INSERT INTO CLAIMS1 (CLAIMNO) VALUES (X1)")
I believe, it will not work because (at least) the variable X1 will not be recognized there: the value of X1 should be passed, and it should be formatted depending on whether it is numeric, character, or other type. I assume that you have either character or numeric data types. Then try this:
?sqlexec(gnConnHandle,"INSERT INTO CLAIMS1 (CLAIMNO) VALUES ("+;
    iif(type("X1")="C", "'"+X1+"'", trans(X1) )+  ")" )
Let me know....


>Yuri,
>sorry to be so tense. But I have never worked with Access (Or SPT)
>I think I need to pass a whole string. So I do the following now and stille does not work:
>
>TEXT TO lcSQL NOSHOW TEXTMERGE
>INSERT INTO CLAIMS1 (ClaimNo) VALUES ("<<X1>>")
>ENDTEXT
>
>if  sqlexec(gnConnHandle,lcSQL)  <=0
> *** it ends up here because of error
>.....
>
>endif
>
>
>
>Peter
>
>
>>For some reason it does not recognize all of the pieces from "insert" statement. Try to insert just one one field first, then add another field, and so on until you get to the point.
>>
>>
>>>I get this error but don't know what it means:
>>>
>>>Connectivity error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 17.
>>>
>>>
>>>
>>>
>>>
>>>>AERROR(aa) should give you the information about what was wrong.
>>>>

>>>>if sqlexec(...) <=0
>>>> if aerror(aa)>0
>>>> ?aa[2]
>>>> else
>>>> ?"?????????"
>>>> endif
>>>>endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform