Results 1 to 3 of 3

Thread: SQL with VB6!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    256

    SQL with VB6!

    Well, i'm startiing with sql in vb6 and i have a few questions.

    First:


    I have to make this query:

    SELECT [chname] FROM [database].[dbo].[table]

    and it must return all the chnames of the table.

    Second: i want to count the lines of the same query.

    Anyone can help?






  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: SQL with VB6!

    Recommend spending several minutes reviewing the Database FAQ.

    Once you have a connection object opened to your database, the query will be used in the .Execute method of the connection object to return a recordset or used in the .Open method of a recordset object.

    Either way, the count can be determined by the .RecordCount of the recordset object.

    The FAQ page has examples also.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: SQL with VB6!

    Thread moved to Database Development forum (the "VB6" forum is meant for questions which don't fit in more specific forums)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width