Skip to Content
0
Former Member
May 19, 2004 at 08:18 AM

SQL: Syntax using DI...(Insert)

19 Views

Hi, I am a trying to make an Insert with the DI in the table (OPRJ), But I get an SQL Error for the sintaxis, can any one help me please, I am a beginner with the DI.

Here is the code.....

Case et_ITEM_PRESSED

If pVal.ItemUID = "EndCustBtn" Then

Set oItem = oTmpForm.Items.Item("74")

Set oEditText = oItem.Specific

lDocNum = CLng(oEditText.String)

Set oItem = oTmpForm.Items.Item("50")

Set oEditText = oItem.Specific

lDocEntry = CStr(oEditText.String)

Private Sub Update()

Dim i As Long

Dim oCode1 As SAPbouiCOM.EditText

Dim oName1 As SAPbouiCOM.EditText

Dim oCode2 As SAPbouiCOM.EditText

Dim oName2 As SAPbouiCOM.EditText

oRecordset.DoQuery "Insert INTO OPRJ (PrjCode, PrjName) VALUES (lDocNum,lDocEntry )"

-


I Get the error, with tha variable lDocNum, and lDocEntry, how can i put it, in ordenr to execute the SQL.

Thank's

Message was edited by: Frank Moebius

Hi Natalia, though triggered in a UI event handler, your question is about DI; I changed that to avoid confusion. I hope you don't mind. Frank