Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, I'm using ADO as a begginner. I'm confused with recordset melthod: seek, edit, addnew, sort ... Thanks -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do a Google. I found this http://www.w3schools.com/ado/ado_recordset.asp
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "OverAC" wrote in message ... Hi all, I'm using ADO as a begginner. I'm confused with recordset melthod: seek, edit, addnew, sort ... Thanks -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dear Bob Phillips Thanks for your link, it's very helpful and It helped me to understand more about ADO. It will be great if those code is for Excel VBA (they all now are for html :( ). Thanks anyway. OverAC -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Recordsets work in the same way in Excel. You are after all just accessing
via ADO, which simplifies matters. Here is a simple example of reading an Excel sheet into a recordset Public Sub GetData() Dim oConn As ADODB.Connection 'Object Dim oRS As ADODB.Recordset 'Object Dim sFilename As String Dim sConnect As String Dim sSQL As String sFilename = "c:\Mytest\Volker1.xls" sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & sFilename & ";" & _ "Extended Properties=Excel 8.0;" sSQL = "SELECT * FROM [Sheet1$]" Set oRS = New ADODB.Recordset 'CreateObject("ADODB.Recordset") oRS.Open sSQL, sConnect, adOpenForwardOnly, _ adLockReadOnly, adCmdText If Not oRS.EOF Then ActiveSheet.Range("A1").CopyFromRecordset oRS Else MsgBox "No records returned.", vbCritical End If oRS.Close Set oRS = Nothing End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "OverAC" wrote in message ... Dear Bob Phillips Thanks for your link, it's very helpful and It helped me to understand more about ADO. It will be great if those code is for Excel VBA (they all now are for html :( ). Thanks anyway. OverAC -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks. That's great. a little confusing thing remains, please help me the code to list ou all records which have a field match my conditions. for ex CustomerName begins with ABC (I understand how to start with ADO now, so ignore cornection) Thanks in advance OverA -- OverA ----------------------------------------------------------------------- OverAC's Profile: http://www.excelforum.com/member.php...fo&userid=3239 View this thread: http://www.excelforum.com/showthread.php?threadid=52163 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
.... or even in the initial query?
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "OverAC" wrote in message ... Thanks. That's great. a little confusing thing remains, please help me the code to list out all records which have a field match my conditions. for ex: CustomerName begins with ABC (I understand how to start with ADO now, so ignore cornection) Thanks in advance OverAC -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you want to do it in the recordset, in VBA, or in another Excel
spreadsheet? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "OverAC" wrote in message ... Thanks. That's great. a little confusing thing remains, please help me the code to list out all records which have a field match my conditions. for ex: CustomerName begins with ABC (I understand how to start with ADO now, so ignore cornection) Thanks in advance OverAC -- OverAC ------------------------------------------------------------------------ OverAC's Profile: http://www.excelforum.com/member.php...o&userid=32396 View this thread: http://www.excelforum.com/showthread...hreadid=521630 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic code not working when sheet is saved | Excel Discussion (Misc queries) | |||
Basic shortcuts not working - Have different meaning | Excel Discussion (Misc queries) | |||
Recordset.FindFirst argument not working... | Excel Worksheet Functions | |||
I must be tired, because basic Math isn't working..... | Excel Worksheet Functions | |||
Type recordset/recordset? | Excel Programming |