[AccessD] Access VB question

Drew Wutka DWUTKA at marlow.com
Fri May 2 17:17:38 CDT 2003


I may be mistaken, but nothing in that code bypasses the startup stuff. 
 
Drew

-----Original Message-----
From: Jim Lawrence (AccessD) [mailto:accessd at shaw.ca]
Sent: Friday, May 02, 2003 4:51 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Access VB question


Hi Jarad:
 
Assuming you are using ADO-OLE and have your MS Recordset object Library
attached here is the code I would use:
 
Public Sub GetConnected()
    Dim gconROD As ADODB.Connection
    Dim gstrConnection As String
    Dim gsDBPFName As String

    On Error GoTo Err_GetConnected
    
    gsDBPFName =  \\Myserver\MyDBDirectory\rod.mdb
<file://\\Myserver\MyDBDirectory\rod.mdb> 

    gstrConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                    "Persist Security Info=False;" & _
                    "Data Source=" & gsDBPFName
                    
    Set gconROD = New ADODB.Connection
    gconROD.Open gstrConnection
    
Exit_GetConnected:
    Exit Sub
    
Err_GetConnected:
    ShowErrMsg ("GetConnected")
    Resume Exit_GetConnected
    
End Sub
 
This is of course overly simplified but...
HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Huffman, Jarad B.
Sent: Friday, May 02, 2003 9:22 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Access VB question



Does anyone know how to programmatically open an access database in VB,
bypassing the startup options?  

Jarad Huffman 
Applications Support Analyst 
Information Systems 
McDonough District Hospital 
Macomb, IL 61455 
(309) 833-4101 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/0fee1419/attachment-0001.html>


More information about the AccessD mailing list