Click here to Skip to main content
14,698,201 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,
I just need to know how can I establish a connection between my VB.net Project and pervasive SQL.
Posted
Comments
[no name] 1-Jul-13 9:44am
   
http://www.connectionstrings.com/pervasive

1 solution

Hello,

You can use ADO.NET Provider for Pervasive available from here[^]. Here[^] is a link for Pervasive ADO.NET provider documentation. Here is a sample code to connect to Pervasive db,
Imports System.Data;
Imports System.Data.Common;
Imports Pervasive.Data.SqlClient;

Public Class TestDB
     Public Sub TestDB()
         DIm dbCon As PsqlConnection

         dbCon = new PsqlConnection("Server DSN=DEMODATA;Host=localhost") 
         Try
             dbCon.Open()
             Console.WriteLine("Connection Successful!")
         Catch ex As PsqlException
             Console.WriteLine("Failed to Connect")
         Finally
            dbCon.Close()
         End Try 
     End Sub
End Class

Regards,
   
v2
Comments
Sams13 2-Jul-13 1:55am
   
Thank you. It works

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900