Microsoft Visual C++ – Compiling for 64-bit

Background As I tried to run our little ODBC application noticed that we have not created the targeted ODBC Data Source. Error Error Image Error Text Remediation Created the datasource and as I thought more, opted to consider 64-bit platforms, as well Target - x64 Objective Let us compile our application and target 64-bit bitness. … Continue reading Microsoft Visual C++ – Compiling for 64-bit

ODBC – SQLBindCol Function – Using Microsoft’s sample code – Code Review

Background A quick follow-up to our original post on using the ODBC SQLBindCol function. Lineage ODBC – SQLBindCol Function – Using Microsoft’s sample code Date Published :- 2020-01-01 Link Microsoft Sample Web Site Tried out Microsoft's sample; available here. Docs / SQL ODBC / ODBC Advanced / Microsoft Open Database Connectivity (ODBC)/  ODBC Programmer's Reference … Continue reading ODBC – SQLBindCol Function – Using Microsoft’s sample code – Code Review

ODBC – SQLBindCol Function – Using Microsoft’s sample code

Background Reading more on ODBC via C. Microsoft Sample Web Site Tried out Microsoft's sample; available here. Docs / SQL ODBC / ODBC Advanced / Microsoft Open Database Connectivity (ODBC)/  ODBC Programmer's Reference / API Reference / ODBC API Reference / SQLBindCol Function SQLBindCol Function Link Compile Tried compiling the code. Output Image   Text … Continue reading ODBC – SQLBindCol Function – Using Microsoft’s sample code

Microsoft – Visual C++ :- Compilation – Warning – warning C4172: returning address of local variable or temporary

Background Ran into a compiler warning while compiling a simple C application. Error Error Text Error Image Research StackOverflow warning: function returns address of local variable [enabled by default] [duplicate] Link https://stackoverflow.com/questions/17312336/warning-function-returns-address-of-local-variable-enabled-by-default  ( Link ) Code Here is the cited code :- Image Text Question This yields: ...and i can't figure out what is wrong … Continue reading Microsoft – Visual C++ :- Compilation – Warning – warning C4172: returning address of local variable or temporary

C – Get Ini File name from application name

Background I think back to my time down south. Straight out of College first job was C on an IBM OS/2 box; writing Insurance software for a company down in Australia. Get the Ini File name based on the executable file name filename.h filename.c Sharing Sharing here filename.h Link filename.c Link Dedicated Dedicating to my … Continue reading C – Get Ini File name from application name

Visual Studio .Net – C++ – ODBC / Database Connection

  Background Using a very nice and well documented code from Easysoft as a sample, wanted to see how to connect and disconnect from an ODBC datasource. Code Outline Function :- ParseCommandLineArguments Get Command Line Arguments int argc char* argv[] Function :- extractODBCError SQLGetDiagRec Function :- Main Function :- SQLAllocHandle SQL_HANDLE_ENV Function :- SQLSetEnvAttr ODBC/Version … Continue reading Visual Studio .Net – C++ – ODBC / Database Connection

Visual Studio .Net – C++ – Compile Error – “error LNK2019: unresolved external symbol _SQLAllocHandle@12”

Background Error linking a very simple ODBC Application written in C. Error Error Image Error Text TroubleShooting Review Compilation Step Command Code Remediation Outline Include the following libraries ODBC32.lib   Code Crediting Crediting Sybase SYBASE - Infocenter SQL Anywhere 12.0.1 > SQL Anywhere Server - Programming > ODBC support> Building ODBC applications Linking ODBC applications … Continue reading Visual Studio .Net – C++ – Compile Error – “error LNK2019: unresolved external symbol _SQLAllocHandle@12”