Change ADODB.Recordset by New

Remphan

New member
Local time
Yesterday, 17:28
Joined
Mar 10, 2016
Messages
3
Help pls change ADODB.Recordset and adodb.connection with New.ADODB.Recordset and New.adodb.connection
in that code:

Code:
Option Explicit  Function DataSql(dt_sql) DataSql = "#" & Format(dt_sql, "mm\/dd\/yy hh\:mm\:ss") & "#" End Function  Function GetAccessConnect(FilePath As String) Dim sCon As String, strMyDBPassword As String Set GetAccessConnect = CreateObject("adodb.connection") strMyDBPassword = "642531" With GetAccessConnect     .CursorLocation = 3     sCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="     sCon = sCon & FilePath & ";Jet OLEDB:Database Password=" & strMyDBPassword & ";"       .Open sCon End With End Function  Sub test55() Set Cn = GetAccessConnect(ThisWorkbook.Path & "\data.accdb") Set Rs = CreateObject("ADODB.Recordset") End Sub  Function GetRs(Cn, sstr) Set GetRs = CreateObject("ADODB.Recordset") GetRs.Open sstr, Cn, 3, 3 End Function
 
How about posting you code with new lines in it, telling us what this is supposed to do, what it's doing and what it's not doing.
 

Users who are viewing this thread

Back
Top Bottom