Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 26-07-2005, 03:43 PM   #1 (permalink)
Apprentice
 
Join Date: May 2005
Posts: 87
Default PHP MySQL can we have some other combination


I am learning to use two open source softwares, php and MySQL. But now I want to use MySQL with VB6. Is it possible?
I have used VB access before.
__________________
Attack ur enemy when he does not expect u, appear where u r least expected.
akshar is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 26-07-2005, 05:10 PM   #2 (permalink)
Wise Old Owl
 
alib_i's Avatar
 
Join Date: Jun 2004
Location: omnipresent
Posts: 1,191
Default

http://dev.mysql.com/tech-resources/...-handling.html
http://www.vbmysql.com/

-----
alibi
__________________
What I've felt, What I've known; Never shined through in what I've shown
Never free, Never me; So I dub thee unforgiven
-Metallica
alib_i is offline  
Old 27-07-2005, 11:46 AM   #3 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

Here's some small SQL tutorial/Tips
http://www.vbforums.com/showthread.php?t=81916

Have a look at these links too
http://www.mysql.com/search/?q=%22Vi...set=iso-8859-1
http://www.vbforums.com/showthread.p...ighlight=mysql

ADO Tutorial
http://www.vbforums.com/showthread.php?threadid=153935

And here's the best
http://www.vbforums.com/showthread.p...ighlight=mysql
Quote:
Originally Posted by Mark Gambo @ VB Forums
Here is what I use to connect to MySql:
visual basic code:
Code:
Option Explicit
Dim strDataBaseName As String
Dim strDBCursorType As String
Dim strDBLockType As String
Dim strDBOptions As String
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection

Private Sub Command1_Click()
On Error GoTo Command1_Click_Error
Dim b as Long
strDBCursorType = adOpenDynamic  'CursorType
strDBLockType = adLockOptimistic   'LockType
strDBOptions = adCmdText         'Options

Set cn = New ADODB.Connection
Me.MousePointer = 11

cn.Open ConnectString()
    
    With cn
        .CommandTimeout = 0
        .CursorLocation = adUseClient
    End With

    Set rs = New ADODB.Recordset       'Creates record set

    strSQL = "<Your SQL Here>"
        rs.Open strSQL, cn, strDBCursorType, strDBLockType, strDBOptions
    

if rs.Eof then
   Goto ExitSub    
else
    For b = 1 To rs.RecordCount
	'<do whatever you need to do with the data here>
    Next b
end if
    
ExitSub:

rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing

On Error GoTo 0
Exit Sub

Command1_Click_Error:
    MsgBox "Error " & Err.Number & " (" & Err.Description & ")  & _
                     in procedure Command1_Click of Form " & Me.Name
End Sub

Private Function ConnectString() As String
Dim strServerName as String
Dim strDatabaseName as string
Dim strUserName as string
Dim strPassword as string

    'Change to IP Address if not on local machine
    'Make sure that you give permission to log into the
    'server from this address
    'See Adding New User Accounts to MySQL
    'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver 
strServerName = "localhost" strDatabaseName = "DatabaseName"
strUserName = "UserName"
strPassword ="Password"

ConnectString = "DRIVER={MySQL ODBC 3.51 Driver};" & _
                "SERVER=" & strServerName & _
                ";DATABASE=" & strDatabaseName & ";" & _
                "USER=" & strUserName & _
                ";PASSWORD=" & strPassword  & _
                ";OPTION=3;"

End Function
tuxfan is offline  
Old 04-08-2005, 07:02 PM   #4 (permalink)
Apprentice
 
Join Date: May 2005
Posts: 87
Default

thanks that really helped
__________________
Attack ur enemy when he does not expect u, appear where u r least expected.
akshar is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Charan

Advertisement




All times are GMT +5.5. The time now is 04:53 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2