Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11

    Default My First Post


    vb6 is object based PL so dali ra pagconnect to virtually any database, basta naa available na object to do that. Pareha sa MS ADO. Add lang reference to it then create an adodb object.

    Code:
    Public con As New Adodb.Connection
    
    Sub Main()
       con.Open [connection string] 'visit http://connectionstrings.com for info
    End Sub

  2. #12
    in my case mas ganahan ko sa connection string through codes not on data link properties

  3. #13
    pure codes bitaw na..no ocx needed

  4. #14
    Quote Originally Posted by crystaldots View Post
    Pag .NET nalang bro...(VB.NET or C#)., vb6 is pretty old technology.
    yes it is! but admit it, most companies now are still using vb6.
    VB6 written programs might be slower than programs written in .net or C but the later takes more time and is more bug prone. For the recent machines (dual-core, quad-core etc), your time coding is more precious than execution speed of your compiled program.

  5. #15
    thanks for all ur help here bros... it really helped alot! I was able to get a good answer from a new friend and i was able to resolve many of my questions about databases.

  6. #16
    this is a sample program.
    Eto yung connection string ko...

    Public Const sqlCon = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=ServerAddress;DATABASE=databaseName ;USER=User;PASSWORD=Password"

    Note: Mysql ang database na gamit ko dito, so para maka connect ka sa mysql you need Mysql ODBC Driver.

    Then:

    Dim adoConn As ADODB.Connection
    Dim rs As New ADODB.Recordset
    Dim str as string

    Set adoConn = New ADODB.Connection
    adoConn.ConnectionString = sqlCon
    adoConn.Open

    Set rs = New ADODB.Recordset
    str = "Select * from Table"

    rs.ActiveConnection = adoConn
    rs.LockType = adLockOptimistic
    rs.CursorLocation = adUseClient
    rs.CursorType = adOpenDynamic
    rs.Open str


    hope this helps.

  7.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. cambodia and vietnem, how to get there?
    By bee-emvee in forum Destinations
    Replies: 11
    Last Post: 03-07-2014, 04:02 PM
  2. Tips And Tricks How To Change IP Address
    By lemzuico in forum Alternative Systems
    Replies: 2
    Last Post: 11-02-2012, 07:49 PM
  3. I Need help, advice and I want to Loan
    By jecskie in forum Business, Finance & Economics Discussions
    Replies: 32
    Last Post: 09-15-2012, 10:24 PM
  4. In need of a versatile band vocalist and knows how to dance?
    By vernieceniza in forum Music & Radio
    Replies: 0
    Last Post: 08-20-2010, 05:16 PM
  5. Election-related Forms of Cheating and the How-Tos counter
    By vp-rakista in forum Politics & Current Events
    Replies: 8
    Last Post: 08-08-2009, 01:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top