by Sobha (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 15th July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This can be used to Create DSN at run time
Project -> Refenece -> select microsoft dao 3.6
'put the following code in the procedure where you want to register DSN
dao.RegisterDatabase "CheemoBackup", "Microsoft Access Driver
(*.mdb)", True, "DBQ=" & Trim(App.Path & "\transfer\CheemoData.mdb") & vbCr
& "OemToAnsi=No" & _
vbCr & " Database=" & Trim(App.Path &
"\transfer\CheemoData.mdb")