Hi,
Thanks for the reply.
Here i am creating objects in one file and i want to use those objects in another file.
For example, I am creating the bellow objects in my header file Include.au3
Global $oConn = ObjCreate("ADODB.Connection")
Global $oRS = ObjCreate("ADODB.Recordset")
In my main script, i have created a function to retrieve the database contents, so iam using in the following way.
Func _postgres_query($Query, $cloumnname, $Data)
$oConn1 = ObjGet("", "ADODB.Connection")
$oRS1 = ObjGet("ADODB.Recordset", "")
$db_Settings = "DRIVER={PostgreSQL Unicode};DATABASE=test;" & _
"SERVER=localhost;PORT=5432;Uid=postgres;" & _
"Pwd=postgres;" & _
"A0=0;A1=6.4;A2=0;A3=0;A4=0;A5=0;A6=;A7=100;A8=4096;A9=0;" & _
"B0=254;B1=8190;B2=0;B3=0;B4=1;B5=1;B6=0;B7=1;B8=0;B9=1;C0=0;C1=0;C2=dd_"
$oConn1.Open($db_Settings)
$oRS1.Open($Query, $oConn1, 1, 3)
$oRS1.MoveFirst
For $iIndex = 1 To $oRS1.RecordCount
$Value = $oRS1.Fields($cloumnname).value
IF($Value = $Data) Then
Return 1
EndIf
$oRS1.MoveNext
Next
Return 0
$oConn1.Close
EndFunc ;==>_postgres_query
when i execute, i am getting the error as
C:\Program Files\AutoIt3\Include\Include.au3 (454) : ==> Variable must be of type "Object".:
$oConn1.Open($db_Settings)
$oConn1^ ERROR
Please Help!!!!