Michael
Wed Aug 11 05:51:28 CDT 2004
Hi,
That is the version I am using. Further investigation shows that the
problem is codepage-related:
1. The problem is reproducible even in a simple console application (sample
below).
2. It ONLY occurs when there are code page mismatches. My machine is
running in a Hebrew locale (CP-1255) while the DBF file I am accessing was
created using CP-1252 (English). In this configuration, the problem is
consistent. I haven't tried other codepage variations.
I tried setting the codepage in the connection string ("Locale
Identifier=1252;") but it didn't help.
Thanks again,
Michael
Here is the simple code I wrote to reproduce the problem:
static void Main(string[] args)
{
OleDbConnection conn = new OleDbConnection();
OleDbCommand cmd = new OleDbCommand();
conn.ConnectionString = @"Data Source=" +
@"""E:\Test.NET\TestVFPMemo\data\VFPTest.dbc"";" +
@"Provider=""VFPOLEDB.1"";Collating Sequence=GENERAL;Mode=Share Deny
None";
cmd.Connection = conn;
conn.Open();
cmd.CommandText = "Select notes from Test where schoolid=1";
string s = (string)cmd.ExecuteScalar();
cmd.CommandText = "Update test set notes=? where schoolid=1";
cmd.Parameters.Add(new OleDbParameter("sometext", s+s+s));
cmd.ExecuteNonQuery();
conn.Close();
}
Note that the referenced database has a single table "test" with two fields:
schoolid (integer) and notes (memo).
"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:%23WaKBx3fEHA.2928@TK2MSFTNGP10.phx.gbl...
> Hi Michael,
> You say you're using the latest VFP OleDb driver (VFP8).
> Are you awere there was an update for it (8.0a)?
> Here's a link for the download:
>
http://www.microsoft.com/downloads/details.aspx?familyid=0f43eb58-7a94-4ae1-a59e-965869cb3bc9&displaylang=en
>
> HTH,
> Sietse Wijnker
>
> "Michael Schuldenfrei" <michaels-no-spAm@actionbase.nospam.com> wrote in
> message news:%23RRD4gyfEHA.3676@TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > I have a VFP 6 database that I am accessing from ASP.Net using the
latest
> > VFP (version 8) OleDB driver and I am having some serious problems
> updating
> > Memo fields. I am using a parameterized query to perform the update,
but
> if
> > the argument contains more than 512 characters, the first 512 characters
> get
> > repeated over and over again in the database (up to the length of the
> > original string.)
> >
> > In desperation, I tried breaking the string down into small (<250)
> character
> > strings and to append these to the Memo one after the other using
"Update
> > mytable set myfield = myfield + ?" however, I still get the same
results.
> >
> > Can anyone help me on this?
> >
> > Thanks,
> >
> > Michael Schuldenfrei
> >
> >
> >
> >
>
>