You can use the [ code] tag or the [ quote] tag to get proper spacing.
Anyway, I see your problem:
Sub pervasiveExample()
Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection
adoConn.ConnectionString = "driver={Pervasive ODBC Client Interface};DBQ=DEMODATA"
adoConn.Open
If adoConn.State = adStateOpen Then
MsgBox "Welcome"
Else
MsgBox "Error connecting to Database."
End If
End Sub
If you are using the "driver=" in the connection string, you cannot use a path. You must specify the database name (or engine DSN by using ServerDSN= and ServerName= for remote connections) in the connection string. You also do not specify a Provider when using the ODBC driver.