Hi, is it possible to use Microsoft ActiveX Data Objects 2.6 Library in VBScript in AFL?
I am having some problems to solve this error: (error S0. Arguments are of the wrong type......) at .CursorLocation = adUseClient and does someone know if I can call an VBScript as a function? I am not sure if I am on the right path or if it is better to write this as a .dll and use it as a plugin in Amibroker in afterwards? Many thanks for your help, dubi Exp: blnBuy = True; sIBName = "ESU9"; EnableScript("vbscript"); <% const cFile_VB = "D:\Amibroker\Trade Reports\MS Access.mdb" conStrAmibroker_VB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & cFile_VB sIBName_VB = AFL("sIBName") blnBuy_VB = AFL("blnBuy") if blnBuy_VB then sAction_VB = "Buy" Set conn_VB = CreateObject("ADODB.Connection") conn_VB.Open conStr_VB Set rs_VB = CreateObject("ADODB.Recordset") sSql_VB = "SELECT * FROM [tblName]" With rs_VB .Source = sSql_VB .ActiveConnection = conn_VB .CursorLocation = adUseClient .CursorType = adOpenStatic .LockType = adLockOptimistic .Open iRows_VB = .RecordCount .AddNew '.MoveLast ![Contract] = sIBName_VB ![Action] = sAction_VB .Update End With Set rs_VB = Nothing Set conn_VB = Nothing AFL ("errorMessage") = err.Description %>