Hi guys, i'm a newbie in this forum, and this is my first question here, hope anyone here willing to help.
thanks.
Hi guys, i'm a newbie in this forum, and this is my first question here, hope anyone here willing to help.
thanks.
hello there ...
i don't believe if everyone here can't help me
Regards,
Ferry Huang
Hi,
Try posting the problem code as text within a post & you'll be more likely to get an answer because not many people feel like trusting/risking enough to download & open unknown attachments.
hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...
Hey you might want to read the article located here. http://www.microsoft.com/technet/scr.../tips1103.mspx
It should give you the information you need.
Here it is, the code with the problem
Option Explicit
Public con As New ADODB.Connection
Public rs As New ADODB.Recordset
Public Sub RetrieveData()
If (con.State = adStateOpen) Then Call con.Close
Call con.Open("Provider=MSDASQL.1;Extended Properties=""DSN=Excel Files;DBQ=" & ThisWorkbook.FullName & ";DefaultDir=" & ThisWorkbook.Path & ";DriverId=790;MaxBufferSize=2048;PageTimeout=5;""")
If (rs.State = adStateClosed) Then
Call rs.Open("SELECT T.* FROM T", con, adOpenStatic, adLockReadOnly, adCmdText)
Else
Call rs.Requery
End If
' Call rs.MoveNext 'why this operation increase memory usage???
' Call MsgBox(rs.RecordCount) 'and this one too. how to anticipate this?
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks