Command contains unrecognized phrase/keyword VB.Net

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi

I am facing the above problem when I am trying to insert a MEMO data in
to the VFP table. I am using a OLEDB connection string in VB.Net

My data present in the file is

//------------------------------

Pen

Pencil

Erasier

Sharpener

//----------------------------

Each an every line has a (Vbcrlf) that is a line feed in it I need the File
as in the above format to be stored in the memo file without any change

I get the data from the file by the following procedure

----------

Dim lstrData As New String(" ", 500)

FileOpen(1, "C:\soc.txt", OpenMode.Binary)

FileGet(1, lstrData)

FileClose(1)

--------

I get the data in the lstrdata Now I use sql statment to insert into the vfp
table

sql = "Insert into edifile (theirref,qtnord ) Values (' " & lstrdata & "',
'RRTo')

Public gconnMDB_I As OleDb.OleDbConnection

gconnMDB_I = New OleDb.OleDbConnection

gconnMDB_I.ConnectionString = lstrConnString

Call gconnMDB_I.Open()

Dim cmd As New OleDb.OleDbCommand

cmd = New OleDb.OleDbCommand(sql, gconnMDB_I)

cmd.ExecuteNonQuery()

Once cmd.ExecuteNonQuery is excuted the following error occurs

Command contains unrecognized phrase/keyword VB.Net


.