nev 251
Contributor
Can anyone tell me the steps how to do this or direct me to a link? I connect MySQL during runtime. I was wondering if its possible during design time so that I can use the IDE to manage all my MySQL tables.
7 4907 Dököll 2,364
Recognized Expert Top Contributor
Can anyone tell me the steps how to do this or direct me to a link? I connect MySQL during runtime. I was wondering if its possible during design time so that I can use the IDE to manage all my MySQL tables.
Hiya, Nev!
It's likely you have tried this already, but there are some amazing videos I've seen with examples on connecting to SQL Server, might be able to mix it up to make it do what you need for MySQL: http://msdn2.microsoft.com/en-us/express/aa718409.aspx
If this does not work for you, please stay tuned!
Also, Welcome!
Dököll
nev 251
Contributor
Hiya, Nev!
It's likely you have tried this already, but there are some amazing videos I've seen with examples on connecting to SQL Server, might be able to mix it up to make it do what you need for MySQL: http://msdn2.microsoft.com/en-us/express/aa718409.aspx
If this does not work for you, please stay tuned!
Also, Welcome!
Dököll
Thank you! I'll check out the link.
nev 251
Contributor
Hi dokoll, I checked out the link but it only talks of Microsoft's SQL Server. This can be done because when I click the 'Add Datasource', I can select SQL Server from the list. For MySQL however, it doesn't appear in the list that's why I can't select it. How will I 'Add Datasource' MySQL database using the IDE so that I can use for example the Query Designer?
Hey nev,
I just started learning vb.net and mysql today and this site is really helping me a lot. They have an artice on vb.net and mysql.
nev 251
Contributor
Hey nev,
I just started learning vb.net and mysql today and this site is really helping me a lot. They have an artice on vb.net and mysql.
thaksn for the input.
Download MySQL Connector Net 5.0.8.1
Start a new project and add a reference to Microsoft Active Data Objects 2.x.
Project -> Add Reference -> COM tab -> Microsoft Active Data Objects 2.x
Modify the code to suit your needs. -
Public Class Form1
-
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
-
Dim conn As New ADODB.Connection
-
Dim rs As New ADODB.Recordset
-
Dim mysql_server As String = "localhost"
-
Dim db As String = "database_name"
-
Dim user As String = "user_name"
-
Dim pass As String = "password"
-
Dim sql As String
-
Dim fields As Array
-
Dim i As Integer
-
-
Try
-
conn.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};Server=" & mysql_server & ";Database=" & db & ";User=" & user & ";Password=" & pass & ";Option=3;"
-
conn.Open()
-
-
sql = "SELECT FirstName, LastName FROM tbladdresses ORDER BY FirstName;"
-
rs.Open(sql, conn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
-
-
fields = rs.GetRows
-
rs.Close()
-
Catch ex As Exception
-
MsgBox("Connection string is incorrect.")
-
Exit Sub
-
End Try
-
-
For i = 0 To UBound(fields, 2)
-
Debug.Print(fields(1, i))
-
Next
-
-
conn.Close()
-
End Sub
-
End Class
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Eric W. Holzapfel |
last post by:
Hello PHP group,
I have mysql running on a linux box. I have apache (2.0.4) running on a
diff linux box. I have php 4.X. I can connect to the mysql db using
odbc from a windows box, but cannot connect to the remote db from web
server box (linux) to mysql database (another linux box).
Apache is on RH Enterprise 3.0, mysql is on slacware...
|
by: Cern |
last post by:
Is it somebody out there who has made a migration from an Oracle server to an MySQL server??
The scenario is as simply:
I've got a Oracle 8 server with a database with content that I want to transfer to
a MySQL database. No special data, constraints etc that MySQL not will handle.
My solution is to reverse engineer the database from...
|
by: malcolm |
last post by:
Hello,
We use several user controls and derived custom controls. Some of
which actually hit the database at design time to show data (such as
filling a list box, etc...)
Our c# client server app uses the .NET Isolated storage libraries for
storing connection string and other info about the application. The
problem is that the Isolated...
|
by: mistral |
last post by:
Need php script to create mySQL database programmatically; since
hosting configuration may not allow create database from script, script
also need eliminate/rewrite all restrictions in appropriate places in
that hosting.
|
by: basestring |
last post by:
Hi I am busy now for many hours without luck
I have a database and when I use PHP to add date to it, it works only one time
when i want to add the next data, It doesn't work. but i don't get any errors???
see my code:
$query = "INSERT INTO products VALUES ...
| |
by: menmysql |
last post by:
i am not bale to solve this problem since two weeks
i am trying to access records from mysql database using jsp. inside this jsp program i wrote all my JDBC code. it is working very nicely and displaying records.
now i wrote all the JDBC code in .java and i am accessing that code in jsp file. but this time i am getting only exceptions not...
|
by: likigoldenstar |
last post by:
Hi,
I have some problem in developing program using PHP.
I 'll explain my platforms:
I use appserv-win32-2.5.9 as a app server.
In the server, mysql client version is 5.0.37
Problems:
|
by: alex |
last post by:
I've converted a latin1 database I have to utf8. The process has been:
# mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore
--skip-set-charset mydb mydb.sql
# iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql
mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
|
by: vaishalinagare |
last post by:
when i try to connect mysql database with vb 6.0 i got error Data source name not found and no default driver specified. i'm trying to connect remote database.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |