locked
Visual Studio 2010 VB / ADO.NET Connection Problem & Pervasive RRS feed

  • Question

  • Hi all,
    Can somebody please assist me?

    I'm trying to connect to my Pervasive v11 SP1 database to my VB.NET application using ADO.NET (or that is what I would like to do!)

    I can see and read data perfectly from Server Explorer and can see the provider name "ADO.NET Pervasive PSQL Provider"

    In my application I can connect to my SQL Express database using the following syntax:

    myConnection = New SqlConnection("server=localhost;uid=123;password=123;database=Mike")

    This works perfectly!

    My question is what is the connection string syntax to now tell it the new Pervasive provider name ?

    Thanks in advance,
    Mike

     

    • Moved by Andrew.Wu Tuesday, May 17, 2011 9:55 AM (From:Visual Studio Database Development Tools (Formerly "Database Edition Forum"))
    Friday, May 13, 2011 9:15 AM

Answers

  • The reason for this exception could be that you're running the app 64-bit and the provider is 32-bit. If you are running 64-bit Windows make certaint to set the Platform option to x86 (Build...Configuration Manager) so that the application compiles and runs 32-bit. This would be a requirement when using the OLEDB Provider.

    If you are using the Pervasive .NET Provider then it will have to be installed on your system. It does not come with Visual Studio.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Proposed as answer by Jackie-Sun Friday, May 20, 2011 3:12 AM
    • Marked as answer by Alan_chen Tuesday, May 31, 2011 6:26 AM
    Tuesday, May 17, 2011 12:20 PM

All replies

  • Hi,

    I don't think this is the right forum for that (vStudio for DB), you might not have answers.

    Regards,

    Stef

    Friday, May 13, 2011 9:28 AM
  • Thank you which forum whould you suggest?

    Mike

    Friday, May 13, 2011 9:35 AM
  • Friday, May 13, 2011 11:35 AM
  • Hi Tim,

    I have got a little further with this!

    I realised that I was using SqlConnection("connection string") in order to try to connect to ADO.NET, this should be OleDBConnection("connection string")!

    When I use OleDBConnection("Provider=ADO.NET Pervasive PSQL Provider; server=localhost; Database=PFW; Trusted_Connection=Yes")

    I get the error "The 'ADO.NET Pervasive PSQL rovider" provider is not registered on the local machine.

    This is strange as I can connect using this through the Server Explorer!! I installed thePervasive ADO.NET 3.5 v11!!

    Could I be using an incorrect provider name (misspelt)? Is there a way to see what the name should be?

    I did however manage to get OdbcConnection("DSN=name") to work.

    Thanks,
    Mike

    Friday, May 13, 2011 1:13 PM
  • Best forum to ask this is the "ADO.NET Managed Providers forum

    http://social.msdn.microsoft.com/Forums/en-us/adodotnetdataproviders/threads


    GertD @ www.DBProj.com
    Friday, May 13, 2011 4:27 PM
  • Did you try Provider="PervasiveOLEDB"  ?

     


    Tim
    • Proposed as answer by Jackie-Sun Friday, May 20, 2011 3:12 AM
    Friday, May 13, 2011 6:14 PM
  • Hi Mike,

    I'm going to help move your post to the appropriate ADO.NET Managed Providers Forum for better support, where you can contact more ADO.NET experts.

    Thanks for your understanding.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Jackie-Sun Friday, May 20, 2011 3:12 AM
    • Unproposed as answer by Jackie-Sun Friday, May 20, 2011 3:13 AM
    Tuesday, May 17, 2011 9:54 AM
  • Hello Mike,

    Thanks for your post.

    I do agree with Tim, please try this:

    Provider=PervasiveOLEDB;Data Source=myServerAddress;

    Please see more information here:

    http://www.connectionstrings.com/pervasive#72

    I hope this can help you.

     

    have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Jackie-Sun Friday, May 20, 2011 3:13 AM
    Tuesday, May 17, 2011 10:04 AM
  • The reason for this exception could be that you're running the app 64-bit and the provider is 32-bit. If you are running 64-bit Windows make certaint to set the Platform option to x86 (Build...Configuration Manager) so that the application compiles and runs 32-bit. This would be a requirement when using the OLEDB Provider.

    If you are using the Pervasive .NET Provider then it will have to be installed on your system. It does not come with Visual Studio.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Proposed as answer by Jackie-Sun Friday, May 20, 2011 3:12 AM
    • Marked as answer by Alan_chen Tuesday, May 31, 2011 6:26 AM
    Tuesday, May 17, 2011 12:20 PM
  • Hi Mike,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions? 
     
    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

     

    Have a nice day.

     


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 26, 2011 9:20 AM