Oracle 5.0 Reference Manual page 1814

Table of Contents

Advertisement

'rs insert
SQL = "select * from my_rdo"
Set rs = cn.OpenResultset(SQL, rdOpenStatic, rdConcurRowVer, rdExecDirect)
rs.AddNew
rs!id = 300
rs!Name = "Insert1"
rs.Update
rs.Close
'rs insert
SQL = "select * from my_rdo"
Set rs = cn.OpenResultset(SQL, rdOpenStatic, rdConcurRowVer, rdExecDirect)
rs.AddNew
rs!id = 400
rs!Name = "Insert 2"
rs.Update
rs.Close
'rs update
SQL = "select * from my_rdo"
Set rs = cn.OpenResultset(SQL, rdOpenStatic, rdConcurRowVer, rdExecDirect)
rs.Edit
rs!id = 999
rs!Name = "updated"
rs.Update
rs.Close
'fetch back...
SQL = "select * from my_rdo"
Set rs = cn.OpenResultset(SQL, rdOpenStatic, rdConcurRowVer, rdExecDirect)
Do Until rs.EOF
For Each cl In rs.rdoColumns
Debug.Print cl.Value,
Next
rs.MoveNext
Debug.Print
Loop
Debug.Print "Row count="; rs.RowCount
'close
rs.Close
cn.Close
End Sub
20.1.5.7.2. Using Connector/ODBC with .NET
This section contains simple examples that demonstrate the use of Connector/ODBC drivers with
ODBC.NET.
20.1.5.7.2.1. Using Connector/ODBC with ODBC.NET and C# (C sharp)
The following sample creates a table
/**
* @sample
* @purpose
* @author
*
* (C) Copyright MySQL AB, 1995-2006
*
**/
/* build command
*
*
csc /t:exe
*
/out:mycon.exe mycon.cs
*
/r:Microsoft.Data.Odbc.dll
*/
using Console = System.Console;
using Microsoft.Data.Odbc;
Connector/ODBC Examples
my_odbc_net
: mycon.cs
: Demo sample for ODBC.NET using Connector/ODBC
: Venu,
<myodbc@lists.mysql.com>
and demonstrates its use in C#.
1794

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents