Hello. In the following example, to open an Access DB I use the following statement: Set dbBiblio = OpenDatabase(C:\video.mdb). This works fine but the problem is that I dont want to use Access but Pervasive 2000.(It is a RDBMS similar to SQL Server). So, I made my Pervasive DB, then I made a machine data source and I named it "video". Finally I'm trying to open my Pervasive DB like this: Set dbBiblio = OpenDatabase(video). The problem is that it doesn't open automatically. When I run the application I first receive a "Select Data Source" window,then I select "video" DSN and then it runs. How can I connect without having to choose my DSN from the prompt window?
Dim dbVideo As Database
Dim rsTitles As Recordset
Private Sub Command1_Click()
SQLQuery = "Name LIKE '*" & Text1 & "*'"
If rsTitles.NoMatch = True Then Exit Sub
Do Until rsTitles.NoMatch = True
Private Sub Form_Load()
Set dbVideo = OpenDatabase(video)
SQLQuery = "SELECT * FROM Customers"
Set rsTitles = dbVideo.OpenRecordset(SQLQuery)
Do Until rsTitles.EOF = True