Results 1 to 11 of 11
Thread: VB6 + :
Hybrid View
-
2nd May 2006 14:32 #1
VB6 + :
: .
"adcRecordValue.Open" . , ?
Code:Sub RecordValue() Dim adcRecordValue As New ADODB.Connection adcRecordValue.ConnectionString = strConectionString adcRecordValue.CommandTimeout = 30 ActiveConnection = adcRecordValue adcRecordValue.Open If intErr = 0 Then adcRecordValue.Execute "insert into tblhistory (flddate_and_time, fldDevice, fldRegister, fldValue) values ('" _ & DateToString(Date) & " " & TimeToString(Time) & "', " & intDeviceAdressLengthValue(0, intCurentValue) & ", " & _ intDeviceAdressLengthValue(1, intCurentValue) & ", " & Replace(Val("&H" & strRecivedData) / 10 ^ intDeviceAdressLengthValue(3, intCurentValue), "'", ".") & " )", , 1 adcRecordValue.Execute "insert into tblView (flddate_and_time, fldDevice, fldRegister, fldValue) values ('" & DateToString(Date) & " " & TimeToString(Time) & _ "', " & intDeviceAdressLengthValue(0, intCurentValue) & ", " & intDeviceAdressLengthValue(1, intCurentValue) & ", " & Replace(Val("&H" & strRecivedData) / 10 ^ intDeviceAdressLengthValue(3, intCurentValue), "'", ".") & " )", , 1 Else adcRecordValue.Execute "insert into tblerror (flddate_and_time, fldDevice, fldRegister, flderror, fldmessage) values ('" & DateToString(Date) & " " & TimeToString(Time) & "', " & intDeviceAdressLengthValue(0, intCurentValue) & ", " & intDeviceAdressLengthValue(1, intCurentValue) & ", " & intErr & ", '" & strModbusReciveMessage & "')", , 1 Call ErrorLoging(DateToString(Date) & Chr(9) & TimeToString(Time) & Chr(9) & intDeviceAdressLengthValue(0, intCurentValue) & Chr(9) & intDeviceAdressLengthValue(1, intCurentValue) & Chr(9) & intErr & " )") End If adcRecordValue.Close End Sub
-
2nd May 2006 16:57 #2" set adcRecordValue = nothing"
Originally Posted by worm4
... NEW set .... = nothing.
" ? ..."
-
2nd May 2006 18:30 #3

....
.....
-
2nd May 2006 19:09 #4
VB6 , . ...
, ImeNaProcedura(bla1,bla2) ,
" ? ..."
-
2nd May 2006 20:02 #5
:
;: XaMaB; . 0.42
In God we Trust (all others must submit a X.509 certificate). , ()
-
2nd May 2006 20:51 #6Registered User
Join Date: Jul:2001
Location: Redmond, USA
Posts: 1,699
:
ActiveConnection = adcRecordValue
ActiveConnection, ?
memory leek-a intDeviceAdressLengthValue(...) .
Basic-a .
Originally Posted by Rostislao
Soltek 75FRN2-RL bred "B" 1700+ : 1466@2300(11.5x200) 1.85V 512 MB DDR333 TwinMOS: 11-3-3-2@2.8V Leadtek Geforce4Ti 4200 128 MB : 300/600 80GB Seagate 7200.7 CDROM 48x BenQ Enermax EG365P-VE/FCA 350W Creative DT2200 5.1 Middle Tower Water Cooling
-
2nd May 2006 21:33 #7
... . , . 1 ADODB , , . new set... = nothing, , .. nothing

/
...
/
" ? ..."
-
2nd May 2006 22:08 #8Registered User
Join Date: Jul:2001
Location: Redmond, USA
Posts: 1,699
, VB6 ADO, SET conn = Nothing - , ADO Connection-. memory management-a ... Set X = Nothing , .
, ...Soltek 75FRN2-RL bred "B" 1700+ : 1466@2300(11.5x200) 1.85V 512 MB DDR333 TwinMOS: 11-3-3-2@2.8V Leadtek Geforce4Ti 4200 128 MB : 300/600 80GB Seagate 7200.7 CDROM 48x BenQ Enermax EG365P-VE/FCA 350W Creative DT2200 5.1 Middle Tower Water Cooling
-
3rd May 2006 08:09 #9

, NOTHING , new , ...
:Worm4, MSSQL Server, , (
) .
Last edited by Rostislao; 3rd May 2006 at 08:57.
" ? ..."




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in