Results 1 to 7 of 7

Thread: sql in vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    13

    Unhappy sql in vb

    I am writing a project in vb and i need to use sql because i need to create a database in a network. how can i write sql statments in vb?
    like when i tried to declare a begin definition

    exec sql begin declare section
    char pass(10)
    exec sql end declare section

    it was a mistake, because begin & end are saved world's in vb

    please help me out!!
    thank's in advence

    p.s: if u now when i can learn more about this subject please let me now

    thank's a lot.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Is there a reason you've posted this twice?

    Btw, are you doing vb6 or vb.net?

  3. #3
    Lively Member
    Join Date
    Jun 2004
    Location
    Dubai, UAE
    Posts
    64
    Hey Anat,

    Please explain in detail about your environment like, backend, ADO/DAO/ etc. and what you have given as code is no at all VB .

    generally in VB and if you are using ADODC, then it is

    connection.execute ssql

    is the method used to execute any sql statement where connection is an object of ADODC.Connection

    Cheers


    GS

  4. #4
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618
    If you are trying to create a Database you might also want to look into the SQLDMO whether you are in VB 6 or VB.NET, it provides some nice functionality for creating databases through code.
    Sean

    Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    13

    Question sql in vb

    hei, thank's to everyone who tried to help me.
    i'm writing in vb6.
    i need to write a program in vb that uses sql to creat a database in a network. the user's that will run the program will be able to add or change the database.
    i never wrote anything using sql so it's my first time, i read a book about sql and i took the lines that i wrote as example from their so please help me out
    thankes to all in advance.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    As I mentioned in your other thread, check out Beacon's tutorial. It's a good ADO reference, will help you lots when working with databases.

    Also, this is the VB.NET forum, so try being a little careful. You might have ended up trying out SQLDataSets and wondering why nothing's working at all!

  7. #7
    New Member
    Join Date
    Mar 2004
    Posts
    3
    I think first off, you need to figure out your database platform first (MySQL, Oracle, etc, etc). The drivers/syntaxes are different for each.

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