i faced this error :
Command contains unrecognized phrase/keyword
caz the oledb can't put a value more than 254 in a memo
field. what can i do??????
thanx
http://support.microsoft.com/default.aspx?scid=kb;en-us;208208
"HOWTO: Add Records with Memo Data Using the Visual FoxPro ODBC Driver"
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com
"omar" <stin...@hotmail.com> wrote in message
news:522c01c325e1$e9b9e7d0$a101...@phx.gbl...
I don't know the answer to this question but I've passed it along to my
contacts at Microsoft to see what I can find out for you.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com
"omar" <stin...@hotmail.com> wrote in message
news:5c8a01c3266a$aff3df90$a401...@phx.gbl...
I was able to insert a large amount of text with the following code:
Imports System.Data.OleDb
Module Module1
Sub Main()
' Assumes VFP table TestADO (Id C(10), Memo1 M)
' in database Test.dbc
Dim OleDbConnection1 = New OleDbConnection("User ID=;DSN=;" & _
"Cache Authentication=False;Data Source=""C:\MY DOCUMENTS\VISUAL FOXPRO
PROJECTS\TEST.DBC"";" & _
"Password=;Provider=""VFPOLEDB.1"";Collating Sequence=MACHINE;Mask
Password=False;Mode=Share Deny None;" & _
"Extended Properties=;Encrypt Password=False")
OleDbConnection1.Open()
Dim OleDbCommand1 As OleDbCommand = New OleDbCommand
OleDbCommand1.Connection = OleDbConnection1
OleDbCommand1.CommandType = CommandType.Text
OleDbCommand1.CommandText = _
"INSERT INTO TestADO (Id, Memo1) VALUES (?, ?)"
Dim Parm0 As OleDbParameter = New Data.OleDb.OleDbParameter
Dim Parm1 As OleDbParameter = New Data.OleDb.OleDbParameter
OleDbCommand1.Parameters.Add(Parm0)
OleDbCommand1.Parameters.Add(Parm1)
OleDbCommand1.Parameters(0).Value = "Id Here"
OleDbCommand1.Parameters(1).Value = _
"The quick brown fox jumped over the lazy dog. 50" & _
"The quick brown fox jumped over the lazy dog. 100" & _
"The quick brown fox jumped over the lazy dog. 150" & _
"The quick brown fox jumped over the lazy dog. 200" & _
"The quick brown fox jumped over the lazy dog. 250" & _
"The quick brown fox jumped over the lazy dog. 300" & _
"The quick brown fox jumped over the lazy dog. 350" & _
"The quick brown fox jumped over the lazy dog. 400" & _
"The quick brown fox jumped over the lazy dog. 450" & _
"The quick brown fox jumped over the lazy dog. 500"
Dim RowsAffected As Integer = OleDbCommand1.ExecuteNonQuery()
OleDbConnection1.Close()
End Sub
End Module
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.wi...@mvps.org, www.cindywinegarden.com
> >> the oledb can't put a value more than 254 in a memo