Hi,
I have a situation where many procedures of a form are using a ADO connection declared under the General section of the form code:
Now inside one of the procedures I need to define a separate recordset object,say "rst1" using the same connection object "db".Code:Option Explicit Dim db As New ADODB.Connection Dim rst As New ADODB.Recordset ................................. .................................
Do I need to use the 'NEW' keyword to create a new instance of the recordset object variable inside the procedure or is it not necessary to use 'NEW'?
or,Code:Private Sub readdata() Dim rst1 As New ADODB.Recordset
Which of the two should I use & why?Code:Private Sub readdata() Dim rst1 As ADODB.Recordset
Thanks in adavnce.




Reply With Quote