Re: VFP Memos and OleDB

From: Michael Schuldenfrei (michaels-no-spAm_at_actionbase.nospam.com)
Date: 08/11/04

  • Next message: Patrick: "Re: Upsizing a VFP 8.0 database"
    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
    > > >
    > > >
    > >
    >
    >


  • Next message: Patrick: "Re: Upsizing a VFP 8.0 database"

    Relevant Pages

    • Re: Sorting of Scandinavian characters turns out wrong
      ... Kaitzschu schrieb: ... Dictionary sorting is depending on the locale. ... The wiki has some discussion of this: ... Michael ...
      (comp.lang.tcl)
    • Re: The Bug of ReadLine?
      ... Michael Harris ... I guess I wasn't clear on this, it seems to be corrupting the file on an NT ... > Given an ordinary ASCII text file (even one with some null characters ... the data is being corrupted when it is read by readline. ...
      (microsoft.public.scripting.vbscript)
    • Review: The Last Kiss (*** 1/2)
      ... THE LAST KISS ... A film review by Steve Rhodes ... The characters are appealing, and the dialog is sharp and smart. ... The story is really about Michael, ...
      (misc.kids)
    • Review: The Last Kiss (2006)
      ... A film review by Steve Rhodes ... THE LAST KISS, loosely adapted from an equally charming Italian film of the ... The characters are appealing, and the dialog is ... The story is really about Michael, ...
      (rec.arts.movies.reviews)
    • Re: replace characters by numbers
      ... Tom Ogilvy ... "Michael E." ... sometimes the replacement logic is ... characters by numbers is mainly for statistic reasons. ...
      (microsoft.public.excel.programming)