Hi Guys,
I've created a recordset which is saved in a txt file using following code

Private Sub Command0_Click()
Dim Conn As ADODB.Connection
Dim Rs As ADODB.Recordset
Set Conn = New ADODB.Connection
Conn.Open "DSN=movex"
Set Rs = New ADODB.Recordset
Rs.CursorLocation = adUseClient
Rs.Open "Select * from PESALES", _
         Conn, _
         ADODB.adOpenForwardOnly, _
         ADODB.adLockBatchOptimistic
Rs.Save "J:\Power Equipment\Common\SK\db2.rs"
Set Rs.ActiveConnection = Nothing
Rs.Close
End Sub

Now is it possible to create another table or overwrite the same one using the saved recordset?
So far I've come up with following code. I don't know if I'm any close though.

Private Sub Command1_Click()
Dim Conn As ADODB.Connection
Dim Rs As ADODB.Recordset
Set Conn = New ADODB.Connection
Conn.Open "DSN=movex"
Set Rs = New ADODB.Recordset
Rs.ActiveConnection = Conn
Rs.CursorLocation = adUseClient
Rs.Open Source:="J:\Power Equipment\Common\SK\db2.rs", Options:=adCmdFile
Rs.UpdateBatch
End Sub

Hi i have a doubt am new to dis field.can any one help me wit dis
CreateRecordSet(ConnectionString as string, SelectSQLString as String, objRecordSet as RecordSetObject) as Boolean

7. CloseRecordSet(ConnectionString as string, objRecordSet as RecordSetObject) as boolean
give me simple program

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.