This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <occi.h> | |
using namespace std; | |
using namespace oracle::occi; | |
int main( int argc, char* argv[] ) | |
{ | |
Environment* env = Environment::createEnvironment(); | |
Connection* con = env->createConnection("scott", "tiger", "orcl"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <oci.h> | |
int main( int argc, char* argv[] ) | |
{ | |
sword status = OCI_SUCCESS; | |
OCIEnv* envhp; | |
OCIError* errhp; | |
OCISvcCtx* svchp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <tchar.h> | |
#import "msado15.dll" no_namespace rename("EOF", "adoEOF") | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CoInitialize(NULL); | |
_ConnectionPtr cn("ADODB.Connection"); | |
_RecordsetPtr rs("ADODB.Recordset"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <tchar.h> | |
#import "acedao.dll" no_namespace rename("EOF", "aceEOF") | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CoInitialize(NULL); | |
_DBEnginePtr dbe("DAO.DBEngine.120"); | |
DatabasePtr db = dbe->OpenDatabase( _T("hello.accdb") ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <tchar.h> | |
#import "dao360.dll" no_namespace rename("EOF", "daoEOF") | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CoInitialize(NULL); | |
_DBEnginePtr dbe("DAO.DBEngine.36"); | |
DatabasePtr db = dbe->OpenDatabase( _T("hello.mdb") ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <atldbcli.h> | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CoInitialize(NULL); | |
USES_CONVERSION; | |
CDataSource ds; | |
CSession ses; | |
CCommand<CDynamicAccessor> rs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <afx.h> | |
#include <afxdao.h> | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CDaoDatabase db; | |
db.Open( _T("hello.mdb") ); | |
CDaoRecordset rs( &db ); | |
CString strSQL = _T("SELECT 'Hello, DAO(MFC) World!' AS Message"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <afx.h> | |
#include <afxdb.h> | |
int _tmain( int argc, TCHAR* argv[] ) | |
{ | |
CDatabase db; | |
CString strCon = _T("Driver={SQL Server};SERVER=(local);DATABASE=master;UID=sa;PWD=P@ssW0rd"); | |
CString strSQL = _T("SELECT 'Hello, ODBC(MFC) World!' AS Message"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System | |
Imports System.Data.SqlClient | |
Class Hello | |
Shared Sub Main() | |
Dim conStr As String = "SERVER=(local);" _ | |
& "DATABASE=master;" _ | |
& "UID=sa;" _ | |
& "PWD=P@ssW0rd" | |
Dim sqlStr As String = "SELECT 'Hello, ADO.NET World!' AS Message" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.SqlClient; | |
class Hello | |
{ | |
static void Main( String[] args ) | |
{ | |
string conStr = "SERVER=(local);" | |
+ "DATABASE=master;" | |
+ "UID=sa;" |