Oracle 5.0 Reference Manual page 1919

Table of Contents

Advertisement

Visual Basic Example
Dim myConnectionString as String
myConnectionString = "server=127.0.0.1;" _
& "uid=root;" _
& "pwd=12345;" _
& "database=test;"
Try
Dim conn As New MySql.Data.MySqlClient.MySqlConnection(myConnectionString)
conn.Open()
Catch ex As MySql.Data.MySqlClient.MySqlException
Select Case ex.Number
Case 0
Case 1045
End Select
End Try
C# Example
MySql.Data.MySqlClient.MySqlConnection conn;
string myConnectionString;
myConnectionString = "server=127.0.0.1;uid=root;" +
"pwd=12345;database=test;";
try
{
conn = new MySql.Data.MySqlClient.MySqlConnection(myConnectionString);
conn.Open();
}
catch (MySql.Data.MySqlClient.MySqlException ex)
{
switch (ex.Number)
{
case 0:
case 1045:
}
}
MySqlConnection myConnection = new MySqlConnection("server=127.0.0.1;uid=root;" +
"pwd=12345;database=test;Charset=latin1;");
20.2.5.2.3. Using GetSchema on a Connection
The
GetSchema()
about the database currently connected to. The schema information is returned in the form of a
DataTable. The schema information is organized into a number of collections. Different forms of the
GetSchema()
the
GetSchema()
GetSchema()
GetSchema(String)
parameter. If the string "MetaDataCollections" is used then a list of all available collections is
returned. This is the same as calling
Connector/Net Programming
MessageBox.Show("Cannot connect to server. Contact administrator")
MessageBox.Show("Invalid username/password, please try again")
MessageBox.Show("Cannot connect to server.
MessageBox.Show("Invalid username/password, please try again");
Important
Note that if you are using multilanguage databases you must specify the
character set in the connection string. If you do not specify the character set, the
connection defaults to the
part of the connection string, for example:
method of the connection object can be used to retrieve schema information
method can be used depending on the information required. There are three forms of
method:
- This call will return a list of available collections.
- This call returns information about the collection named in the string
Contact administrator");
charset. You can specify the character set as
latin1
without any parameters.
GetSchema()
1899

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents