×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

how to write script (correct my script) for MSFlexGrid

how to write script (correct my script) for MSFlexGrid

how to write script (correct my script) for MSFlexGrid

(OP)
How do I make the script run through the database and write down the records of rs("book_title"),rs("chapter"),rs("verse"),rs("text_data") in a MSFlexGrid?

CODE

Private Sub MSFlexGrid1_Click()
 'Private Sub Form_Load()
    'the format string just lets you define a format for how
    'your flexgrid will appear
    MSFlexGrid1.FormatString = "Book             |" & _
        "Chapter                                 |" & _
        "Verse                                   |" & _
        "Text"
        
    Dim connectionString As String
    Dim query As String
    Dim cn As New ADODB.Connection
    Dim cmd As New ADODB.Command
    Dim rs As New ADODB.Recordset
    Dim Text1
    
    'Text1 = Request("Text1")
    
    'connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\kjv.mdb;User Id=admin;Password=;"
    'query = "SELECT * from bible"
    ''query = "SELECT * from bible WHERE text_data LIKE %" & Text1.Text & "%"


    'make sure the search path to the db is always in the right spot
    Data1.DatabaseName = App.Path & "\kjv.mdb"
    
    'set up the recordsource for the datasource and flexgrid control
    'in this case, it's just a raw SQL query, simple simple.
    Data1.RecordSource = "select * from bible order by id"

    
    cn.connectionString = connectionString
    'cn.Open
    'cmd.ActiveConnection = cn
    cmd.CommandText = query
    
    
    'Set rs = cmd.Execute
    
    
    'While rs.EOF <> True
        'MsgBox (rs("book_title") & " " & rs("chapter") & ":" & rs("verse") & " " & rs("text_data"))
        'rs.MoveNext
        
    'Wend
    'Do Until rs.EOF <> True
        'list1.AddItem (rs("book_title") & " " & rs("chapter") & ":" & rs("verse") & " " & rs("text_data"))
        'rs.MoveNext
    'Loop
    'Do
    'If MsgBox(rs("book_title") & " " & _
    '            rs("chapter") & ":" & _
    '            rs("verse") & " " & _
    '            rs("text_data"), vbOKCancel) = vbCancel Then Exit Do
    'rs.MoveNext
    'Loop Until rs.EOF

    'rs.Close
    'cn.Close
End Sub

RE: how to write script (correct my script) for MSFlexGrid

Are you really sure that this is an engineering problem? The context of the code suggests you need a religious programming site, not a site (like this) specifically for professional engineers. I tried to Google for 'religion' and 'programming' but I found a lot of weird stuff - you may do better!

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: how to write script (correct my script) for MSFlexGrid

(OP)
Well doctor Luke showed in his Gospel that God was a healer. I show that God is a mathematician too!!! Actually others have done that too www.biblewheel.com .

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close