Click here to Skip to main content
14,663,505 members
Rate this:
Please Sign up or sign in to 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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100