Re: VFP Memos and OleDB
From: Michael Schuldenfrei (michaels-no-spAm_at_actionbase.nospam.com)
Date: 08/11/04
- Previous message: Michael Schuldenfrei: "Re: VFP Memos and OleDB"
- In reply to: Michael Schuldenfrei: "Re: VFP Memos and OleDB"
- Next in thread: Stefan Wuebbe: "Re: VFP Memos and OleDB"
- Reply: Stefan Wuebbe: "Re: VFP Memos and OleDB"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 13:37:47 +0300
I've also tried adding "Locale Identifier=1252;" to the connection string -
the bug still happens. Any other ideas?
Michael
"Michael Schuldenfrei" <michaels-no-spAm@actionbase.nospam.com> wrote in
message news:un4$tw4fEHA.3944@tk2msftngp13.phx.gbl...
> Stefan,
>
> Thanks for the response. I have performed a number of tests and come up
> with interesting conclusions.
>
> 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.
>
> Does anyone know if it is possible to change the code page for the OLE DB
> driver (like the "codepage" option in config.fpw)? Perhaps that will
solve
> the problem.
>
> 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).
>
>
> "Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
> news:OqM0$p2fEHA.3272@TK2MSFTNGP11.phx.gbl...
> > Hi Michael,
> >
> > Can you reproduce the effect in pure C# / VB, to track down
> > if it's an OleDB problem or rather CLR / .Net or even an IIS
> > issue or a particular combination of these?
> >
> >
> > -Stefan
> >
> > "Michael Schuldenfrei" <michaels-no-spAm@actionbase.nospam.com> schrieb
im
> > Newsbeitrag news:%23cPOKGxfEHA.2984@tk2msftngp13.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
> > >
> > >
> >
>
>
- Previous message: Michael Schuldenfrei: "Re: VFP Memos and OleDB"
- In reply to: Michael Schuldenfrei: "Re: VFP Memos and OleDB"
- Next in thread: Stefan Wuebbe: "Re: VFP Memos and OleDB"
- Reply: Stefan Wuebbe: "Re: VFP Memos and OleDB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|