Hi, this is what I use and it works just fine :<br>
<br>
Public connLP As ADODB.Connection<br>
<br>
Public Sub OpenConn()<br>
Dim sDB As String<br>
Set connLP = New ADODB.Connection<br>
connLP.CursorLocation = adUseClient<br>
' sDB = GetSetting(appname:="prjTM", section:="DataBase", Key:="CurrentDB", Default:="C:\DbTM.mdb"

<br>
' iHomeBrickID = GetSetting(appname:="prjTM", section:="HomeBrick", Key:="BrickID", Default:=0)<br>
'<br>
' If sDB = "" Then sDB = "D:\Develop\TM\DbTM.mdb"<br>
If sDB = "" Then sDB = "D:\Develop\LusoPiyus\DB\DBLusoP1.mdb"<br>
connLP.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sDB<br>
<br>
End Sub<br>
<br>
Public Sub CloseConn()<br>
connLP.Close<br>
Set connLP = Nothing<br>
End Sub<br>
<br>
' and for the recordsets .... <br>
<br>
dim rs as new adodb.recordset <br>
rs.Open "select * from tbProcessos where nProc = '" & sProc & "'", connLP, adOpenDynamic, adLockOptimistic<br>
<br>
<br>
Notice the provider, thank God I've nothing to do with with ODBC drivers, when the going gets tough it crashes or hangs. <p> <br><a href=mailto: > </a><br><a href= > </a><br>