Click here to Skip to main content
15,914,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple Timer Processes Pin
David Crow17-Jun-04 5:40
David Crow17-Jun-04 5:40 
GeneralRe: Multiple Timer Processes Pin
palbano17-Jun-04 5:53
palbano17-Jun-04 5:53 
GeneralRe: Multiple Timer Processes Pin
jerry1211a17-Jun-04 6:50
jerry1211a17-Jun-04 6:50 
GeneralRe: Multiple Timer Processes Pin
toxcct17-Jun-04 7:46
toxcct17-Jun-04 7:46 
Generalproblem with building help Pin
dart1317-Jun-04 4:41
dart1317-Jun-04 4:41 
GeneralRe: problem with building help Pin
palbano17-Jun-04 4:44
palbano17-Jun-04 4:44 
GeneralRe: problem with building help Pin
dart1317-Jun-04 5:02
dart1317-Jun-04 5:02 
GeneralSQLConnect() Pin
SuzannaS17-Jun-04 4:32
SuzannaS17-Jun-04 4:32 
Hi,
I have created a SQL SERVER ODBC DSN (data source name) with an authentication using Login ID and Password.

I would like to use my DSN without specifing the Login ID and Password in my code: here it is my code:

SQLHENV henv = NULL;
SQLHDBC hdbc = NULL;
SQLHSTMT hstmt = NULL;
SQLRETURN sRet;

PTSTR szDataSource = _T("MyDSN");
PTSTR szUID = _T("LoginID");
PTSTR szPWD = _T("Password");

// Initialize the ODBC environment.
if (SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv) == SQL_ERROR)
{
WriteIntoFile("ERRORE Initialize the ODBC environment");
return false;
}

SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*) SQL_OV_ODBC3,SQL_IS_INTEGER);

// Allocate a connection handle and connect to the data source.
if (SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc) == SQL_ERROR)
{
WriteIntoFile("ERRORE Allocate a connection handle");
return false;
}
if (SQLConnect(hdbc, (SQLTCHAR*) szDataSource, SQL_NTS,
(SQLTCHAR*) szUID, SQL_NTS, (SQLTCHAR*) szPWD, SQL_NTS) == SQL_ERROR)
{
WriteIntoFile("ERRORE Connect to the DataSource");
return false;
}

How can I do it?
GeneralCListCtrl & ToolTips Pin
Gizmo7917-Jun-04 4:25
Gizmo7917-Jun-04 4:25 
GeneralRe: CListCtrl & ToolTips Pin
palbano17-Jun-04 5:19
palbano17-Jun-04 5:19 
GeneralRe: CListCtrl & ToolTips Pin
Gizmo7917-Jun-04 5:55
Gizmo7917-Jun-04 5:55 
QuestionAnybody use SetWorldTransform? Pin
CodeHead17-Jun-04 3:36
CodeHead17-Jun-04 3:36 
GeneralInserting a property sheet/ tab in a dialog box Pin
aarti vimal17-Jun-04 3:24
aarti vimal17-Jun-04 3:24 
GeneralRe: Inserting a property sheet/ tab in a dialog box Pin
David Crow17-Jun-04 3:32
David Crow17-Jun-04 3:32 
GeneralCTreeViewCtrl question Pin
kfaday17-Jun-04 2:58
kfaday17-Jun-04 2:58 
GeneralRe: CTreeViewCtrl question Pin
Arjan Schouten17-Jun-04 3:12
Arjan Schouten17-Jun-04 3:12 
GeneralRe: CTreeViewCtrl question Pin
kfaday19-Jun-04 4:19
kfaday19-Jun-04 4:19 
Generalchange cursor in win32 Pin
udi444417-Jun-04 2:50
udi444417-Jun-04 2:50 
GeneralRe: change cursor in win32 Pin
Johan Rosengren17-Jun-04 5:22
Johan Rosengren17-Jun-04 5:22 
GeneralRe: change cursor in win32 Pin
Scozturk17-Jun-04 5:23
professionalScozturk17-Jun-04 5:23 
GeneralRe: change cursor in win32 Pin
Michael Dunn17-Jun-04 9:36
sitebuilderMichael Dunn17-Jun-04 9:36 
QuestionProgramatically create Bitmap file: How To??? Pin
JHAKAS17-Jun-04 2:46
JHAKAS17-Jun-04 2:46 
AnswerRe: Programatically create Bitmap file: How To??? Pin
V.17-Jun-04 2:50
professionalV.17-Jun-04 2:50 
AnswerRe: Programatically create Bitmap file: How To??? Pin
KarstenK17-Jun-04 4:24
mveKarstenK17-Jun-04 4:24 
AnswerRe: Programatically create Bitmap file: How To??? Pin
John R. Shaw17-Jun-04 12:04
John R. Shaw17-Jun-04 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.