Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2004
    Posts
    9

    Unanswered: need help for pervasive sql

    cannot access data source in asp.net (in client side).. need some info...
    please help!!!

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    First, a few questions:
    1. What version of Pervasive?
    2. What language (C#/VB.NET/Delphi/COBOL/etc)?
    3. WHat interface are you using (ODBC, OLEDB, Managed ADO.NET)?
    4. What error are you getting?

    Now, some suggestions:
    Here's some C# code I've used that puts the data into a Grid. This is WinForms based but should apply to ASP.NET.
    Managed ADO.NET:
    Code:
    DataTable dt;
    PsqlConnection conn = new PsqlConnection("ServerDSN=Demodata");
    conn.Open();
    PsqlDataAdapter da = new PsqlDataAdapter("select * from class",conn);
    DataSet ds = new DataSet();
    da.Fill(ds,"table");
    if (ds != null)
    {
       dt = ds.Tables[0];
    }
    dataGrid1.DataSource = ds;
    dataGrid1.DataMember = "table";
    OLEDB:
    Code:
    OleDbConnection conn = new OleDbConnection("Provider=PervasiveOLEDB;Data Source=Demodata");
    conn.Open();
    OleDbDataAdapter da = new OleDbDataAdapter("select * from class",conn);
    DataSet ds = new DataSet();
    da.Fill(ds,"table");
    if (ds != null)
    {
       dt = ds.Tables[0];
    }
    dataGrid1.DataSource = ds;
    dataGrid1.DataMember = "table";
    ODBC:
    Code:
    OdbcConnection conn = new OdbcConnection("DSN=Demodata");
    conn.Open();
    OdbcDataAdapter da = new OdbcDataAdapter("select * from class",conn);
    DataSet ds = new DataSet();
    da.Fill(ds,"table");
    if (ds != null)
    {
       dt = ds.Tables[0];
    }
    dataGrid1.DataSource = ds;
    dataGrid1.DataMember = "table";
    I've only tested this with Pervasive.SQL V8.5 and V8.6. The Managed Provider and OLEDB won't work with PSQL 2000 or older.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Sep 2004
    Posts
    9
    thank God, a pervasive developer replied!!!
    1.What version of Pervasive?
    version 7
    2. What language (C#/VB.NET/Delphi/COBOL/etc)?
    .net (asp.net)
    3. WHat interface are you using (ODBC, OLEDB, Managed ADO.NET)?
    odbc
    4. What error are you getting?
    this is long...

    i'll gave you an overview... at least..

    i'm creating a asp.net application. i'm trying to get a data in a software called platinum (accounting software) and update my sql server 2000.

    first pervasive sql allow me to use the demo data for practice, so i can get a grip on it.. when i'm trying to create a data source (pointing to platinum software, because this software uses pervasive sql ver 7.) it gave me an error (for what i remember Error 11)..

    so i try to find solution on the net.. but unluckly i can't find one..

    my theory is, in order to connect to pervasive sql server, i must create a database in pervasive sql server (with the same schema of platinum). but the problem is, platinum database is not static, there is chance and always be a chance, that the client update, insert and delete data in platinum database. so this solution is null.. because i might get an obselete data.

    another solution that i can think of, is create a linked database to platinum thru pervasive sql, but version 7 does not support it..

    please help.. please give me some insight...

    how can i get the data to platinum software data (pervasive sql ver 7) directly.. getting the ddf file and everything... thru asp.net.

    i already tried the odbc, oledb, but i can get it to work.. please mirtheil help needed

  4. #4
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    The fact that you are using Pervasive.SQL 7, it's going to limit your choices. The only interface that might work, without a lot of work, would be ODBC.
    First, make sure you are using Pervasive ODBC version 2.54.
    Second, we need to get the ODBC data source created pointing to your data. Once that's done, you'll be able to get to the data from ASP.NET.
    You mention the status 11 creating the data source, what is the exact error?
    When you define the data source, you should point the dictionary path and the data files path to the directory where the Platinum DDFs reside.

    One thing to note, the ODBC included with Pervasive.SQL 7.0 (for that matter, Pervasive.SQL 7.0 as a whole) was never tested with ASP.NET. It may not work. In addition, the ODBC driver was not completely thread safe until right at the very end of the product lifecycle.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  5. #5
    Join Date
    Sep 2004
    Posts
    9

    Post

    >>First, make sure you are using Pervasive ODBC version 2.54.
    how can i know that???
    >> Second, we need to get the ODBC data source created pointing to your data. Once that's done, you'll be able to get to the data from ASP.NET.
    You mention the status 11 creating the data source, what is the exact error?
    When you define the data source, you should point the dictionary path and the data files path to the directory where the Platinum DDFs reside.

    yes, im trying to point to the DDF file where is reside, but when i click the Test button, the error number i mention occur...
    so how can i create odbc source the right way pointing to platinum ddf file.. what i think, odbc will only be created when database file resides in pervasive server.. (right??)


    One thing to note, the ODBC included with Pervasive.SQL 7.0 (for that matter, Pervasive.SQL 7.0 as a whole) was never tested with ASP.NET. It may not work. In addition, the ODBC driver was not completely thread safe until right at the very end of the product lifecycle.

    so do you think the design is wrong.. what i mean (our design is wrong)

  6. #6
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    The easiest way to tell is to look at the version of the Pervasive ODBC Driver in the Drivers tab of the ODBC Admistrator.
    Yes, the data files need to be on the same machine as the engine but you can create an ODBC DSN pointing to a mapped drive if that's where the data files are located.
    Your design should work, but if the ODBC driver causes a crash, the whole system might crash. If you have the ability, you might consider upgrading to Pervasive.SQL V8 (8.6 is current release) from http://www.pervasive.com
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •