I'm baffled, you can probably un-baffelify me <g>




I'm using D7 and am trying to figure out how to do some data access without using Delphi's data
controls. I want to open an ADO recordset and populate some edit controls with the results. I'm
including a bit of VB code below that gives the sense of what I would like to do in D7

Thank you,

Don

I included a reference to msado28.tlb in the VB test project.

Private Sub ADO_Test()

Dim Conn1 As New ADODB.Connection
Dim Rs1 As New ADODB.Recordset
Dim AccessConnect As String

AccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=DHK_Movies.mdb;" & _
"DefaultDir=C:\DelphiProj\MovieDb;" & _
"Uid=Admin;Pwd=;"

Conn1.Open AccessConnect

Set Rs1 = Conn1.Execute("SELECT * FROM Movies")

Rs1.MoveFirst
Do While Not Rs1.EOF
Textbox1.Text = Rs1.Fields("Title").Value
Rs1.MoveNext
Loop

Rs1.Close
Conn1.Close

End Sub
.



Relevant Pages

  • Re: MenuBar properties
    ... recursive function for reading the level on controls. ... Dim cbar As CommandBar ... Dim cbarc As CommandBarControl ... Dim cbarc1 As CommandBarControl 'ControlLevel1 controls ...
    (microsoft.public.access.modulesdaovba)
  • RE: Record Revision
    ... Dim strAlphaCode As String ... 'Lock the controls that can't be changed. ... Dave Hargis, Microsoft Access MVP ... There wouldn’t be a unique key unless one used the ProjNum & RevDate. ...
    (microsoft.public.access.forms)
  • RE: Record Revision
    ... Dave Hargis, Microsoft Access MVP ... Dim strAlphaCode As String ... 'Lock the controls that can't be changed. ...
    (microsoft.public.access.forms)
  • Re: creating check box dynamicly during run time
    ... You can refer to the controls of the form by using a string variable like ... Dim strControlName As String ... assumes Form1 is open in design view. ... So, if employee 6 like Blue and Red, they have 2 *records* in the ...
    (microsoft.public.access.forms)
  • RE: REPOST: Bug in tab control? Access 2007
    ... playing around with anchoring or rather setting these options in the various ... only way to work around this is placing the controls in the position you want ... Dim tabctrl As TabControl ... DoCmd.OpenForm strFormName, acDesign ...
    (microsoft.public.access.forms)