MS Access Query to Get Data from PervasiveDB?

Last post 10-05-2011 11:07 AM by BtrieveBill. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 10-04-2011 5:01 PM

    MS Access Query to Get Data from PervasiveDB?

    Newbie to PervasiveDB, truthfully, I didn't know it existed untill just recently but here goes and hopefully this is the right spot to ask this question. Is it possible to have/write an Access query to get results from a table? My query is as follows and I get a ODBC--call failed. [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified (#0)" error. SELECT * FROM [ODBC;DRIVER={Pervasive ODBC Client Interface};DBQ=@stsqlServerName=#####.#####;ArrayFetchOn=1;ArrayBufferSize=8;TransportHint=TCP:SPX;ClientVersion=10.10.125.000;CodePageConvert=1252;PvClientEncoding=CP1252;PvServerEncoding=CP1252;AutoDoubleQuote=0;].[distributors]; The alleged plan is to try and do this without a DSN connection. For reference, I'm on a Win7 machine running 2007 Access. I assume the database I'm connecting to is v10 but I unfortunately do not have all the details at this time aside from a excel file that appears to have been generated from somewhere with a list of properties and values, including a connection string (maybe a client?). I've never installed anything regarding PervasiveDB stuff either... Is there any settings I should look for and be aware of? I apologize for the lack of information, but I'm running with what I have at the moment. If there is any other information that might help anyone, I will do my best to see if I can supply it. Thanks in advance. :) Ada
  • 10-04-2011 5:15 PM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

     Without having the Pervasive Client installed (and being on the same network as the server), you won't be able to access the database.  Start by installing that & see if it then works for you.  If not, try crating an ODBC DSN (instructions can be found in the manual or at http://www.goldstarsoftware.com/papers/CreatingAnODBCDataSourceForPSQLv11.pdf ) and see if you can connect to that.

     

  • 10-05-2011 7:44 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    I downloaded and installed the version 10 SP3 client, and my luck hasn't gotten me too far. I tried to create a DSN, and the interesting thing is, when I provided the information that I was aware of, it returned a datasource of Demodata, which to my understanding is a basic tutorial/practice database that you supply to your customers. My question is, if I try to add the DSN, is that the only one available at that location or do I need to be more specific in its location? Additionally, when I use: SELECT * FROM [ODBC;DRIVER={Pervasive ODBC Client Interface};DBQ=@stsql;ServerName=cussya2v.1583;ArrayFetchOn=1;ArrayBufferSize=8;TransportHint=TCP:SPX;ClientVersion=10.10.125.000;CodePageConvert=1252;PvClientEncoding=CP1252;PvServerEncoding=CP1252;AutoDoubleQuote=0;].[distributors]; as a query, I get a error ODBC--call failed. [Pervasive][ODBC Client Interface][LNA][Pervasive][ODBC Engine Interface][Data Record manager] Cannot locate the named database you specified (Btrieve Error 2301)(#-3398) [Pervasive][ODBC Client Interface] Invqalid coonection string. Changing the @stsql to @st , I get a" Reserved error (-7778); there is no message for this error. Researching has gotten me nowhere thus far, so at this point, I'm wondering if there is something either wrong with my query,, or if the database is supplied and in the right space in the first place. As a addendum, id/are there specific file(s) that correspond to a PervasiveDB file? Thanks again for your help. It's much appreciated. :)
  • 10-05-2011 8:38 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    Try doing this in stages. Before you even worry about the connection string, get the database working.  Before you even get ODBC working, get the PCC working.

    To get the PCC working, start it up on the workstation and right-click on Engines and select New Server.  Enter the server name & click OK.  Does it connect?  If not, then the server name may be wrong, you may have a DNS problem preventing you from finding the server, the engine may not be running on that server, or a firewall may be blocking your access to the database.

    If you can connect properly, you should see a list of databases there.  Do you ONLY see DEMODATA?  Or do you see the database that you are looking for?

    We'll start with these two simple steps & go on from there.

  • 10-05-2011 9:10 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    My mistake, using the PCC, I do see the database I am looking for.
  • 10-05-2011 9:40 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    OK.  Now that THAT works, create an ODBC "Client" DSN.  Specify the same server name in the box provided and click "Get DSN List".  Select your database name there, then click OK.  You should now be able to use that DSN from MSAccess.

     

  • 10-05-2011 9:56 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    That's the thing, and my apologies if it wasn't clear earlier, but when I look at the DSN list, I only get demodata...
  • 10-05-2011 10:37 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    If you ONLY get DEMODATA, then something is not set up correctly on the server.  You need to go to the server console, run the PCC there, and create the database name for your database files.  Information on this can be found here:

    http://www.goldstarsoftware.com/papers/CreatingAnODBCDataSourceForPSQLv11.pdf

    One other thing -- you posted in the PSQLv10 forum, but are you sure that the server is running PSQLv10?  If you have v9.5 or earlier, then you should ALSO see other databases called TEMPDB and DEFAULTDB.  If these are missing, then it is possible that the system was not properly installed, or that the server is running an older version of the engine.  It is possible that this will not work with a PSQLv10 client.

     

  • 10-05-2011 10:56 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    Unfortunately, I don't have access to the server console. As for the version checking, in the PCC, I do see the DEFAULTDB and TEMPDB databases and it says the version of the engine is 10.12. My one thought is that does the servername need only the server to look for DSN/Databases or does it need specific folders? Thank you again for all your help, it's been most appreciated putting up with me. :)
  • 10-05-2011 11:07 AM In reply to

    Re: MS Access Query to Get Data from PervasiveDB?

    From a client, you need only the server name.  The client contacts the server to request a list of defined databases.  If the database has not yet been created on the server, then this must be done first.  Without the named database (which has to be either created from the server or via an Administrative user), you won't have anything to connect to.

     

Page 1 of 1 (10 items)