vah bi
Messages postés3Date d'inscriptionvendredi 25 février 2005StatutMembreDernière intervention29 septembre 2008
-
29 sept. 2008 à 03:27
BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019
-
29 sept. 2008 à 12:03
Bonjour à tous , voilà je débute en c et comme editeur j'ai le visual c++.
Je fais actuellement une application avec l'api de visual c++ mais en langage c.
J'utilise comme source de données ODBC pour ma connexion à ma bd.
mais je sais pas comment écrire les requetes pour atteindre mes donnée (select, insert into...)
Quelle aide pouvez vous me conseiller pour un débutant
voici mon code:
// RTI.cpp : Defines the entry point for the application.
//
"
#include "stdafx.h"
#include "resource.h"
#include "sql.h"
#include "sqlext.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING];
SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
SQLRETURN retcode;
// The title bar text
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK Emission(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK Present(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK Pconnect(HWND, UINT, WPARAM, LPARAM);
RECT rt;
voidconexion(HWND );
//declaration de la variable de traitement d'environnement et de connection
/* allouer l'environnement de connexion */
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
//
// FUNCTION: InitInstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable