Gorgo said:
If you could write some really simple example how to connect and take some
information from SQL thru ODBC.... I think that this is the best choice for
me.
Carl's advice about the other groups is right on the money.
I'd go further and suggest you find a good book or use the online MSDN
reference. ODBC tries to be DBMS neutral but it doesn't try at all to shield
you from complexity and it is _huge_. It's not something you pick up in an
afternoon.
I just scanned the source to an application I wrote about a decade ago. It
appears that it takes three executable lines to connect:
HENV hEnvironment;
HDBC hDbConnection;
RETCODE rc;
rc = SQLAllocEnv(&hEnvironment);
rc = SQLAllocConnect(hEnvironment, &hDbConnection);
rc = SQLDriverConnect(hDBConnection, /*several more parameters go here*/);
The most important parameter in the last call is the connection string,
which for SQL Server looks something like this:
"DSN=MyODBCDataSetName;Description=MyAppDescription;UID=MyXPUserName;APP=MyA
ppName;WSID=SQLServerName;Trusted_Connection=Yes"
Regards,
Will