using System.Data.Odbc; using System; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { using (OdbcConnection con = new OdbcConnection("DRIVER={SQL Anywhere 11};Commlinks=TCPIP{host=***.net:3053};SERVERNAME=***;DATABASEName=***;UID=dba;PASSWORD=**;Integrated=NO")) { con.InfoMessage += InfoMessage_Event; con.Open(); using (OdbcCommand com = new OdbcCommand("Message 'asdfasdgdag' to client", con)) { OdbcDataReader r = com.ExecuteReader(); } } } private static void InfoMessage_Event(object sender, OdbcInfoMessageEventArgs e) { Console.WriteLine(e.Message); } } }
TYPE WARNING
ExecuteNonQuery
ExecuteReader
connection_id()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)