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

C / C++ / MFC

 
GeneralStoring data Pin
Michael Martin16-Apr-01 18:15
professionalMichael Martin16-Apr-01 18:15 
GeneralRe: Storing data Pin
Christian Graus16-Apr-01 18:47
protectorChristian Graus16-Apr-01 18:47 
GeneralRe: Storing data Pin
Kannan Kalyanaraman16-Apr-01 18:55
Kannan Kalyanaraman16-Apr-01 18:55 
QuestionHow to add a CScrollView on a dialog-based app? Pin
16-Apr-01 17:02
suss16-Apr-01 17:02 
AnswerRe: How to add a CScrollView on a dialog-based app? Pin
16-Apr-01 17:38
suss16-Apr-01 17:38 
GeneralRe: How to add a CScrollView on a dialog-based app? Pin
Kannan Kalyanaraman16-Apr-01 20:06
Kannan Kalyanaraman16-Apr-01 20:06 
QuestionMake DSN (ODBC) with InstallShield? Pin
16-Apr-01 11:34
suss16-Apr-01 11:34 
AnswerRe: Make DSN (ODBC) with InstallShield? Pin
16-Apr-01 14:45
suss16-Apr-01 14:45 
One method(and you didn't here it from me) is to create the appropriate registry entries under the HKLM(for System DSN) or HKCU(for User DSN) \Software\ODBC... look at existing registry keys for the appropriate values to use for your DSN. This isn't recommended because the registry may change and your install won't know it...

I'm not very familiar with Install Shield, but I do know that they allow you to create scripts that can call functions in dll's...
Try your hand at using the following ODBC API functions from your install shield script:

BOOL SQLConfigDataSource(
HWND hwndParent,
WORD fRequest,
LPCSTR lpszDriver,
LPCSTR lpszAttributes);

This function declaration and some of the #defines you'll need are in odbcinst.h. I can't remember which odbc dll it resides in, but I'm pretty sure it's on any machine that uses odbc.

This function will create an ODBC datasource, but it's behavior seems to vary from database to database, ie: if there's not enough data in your lpszAttributes parameter, a dialog may show prompting for the rest of the data, or the function may fail... depends on your database software...

Sample use(from docs):
SQL_RETCODE rc;
UCHAR *szDriver = "SQL Server";
UCHAR *szAttributes =
"DSN=MyDSN\0DESCRIPTION=SQLConfigDSN Sample\0"
"SERVER=MySQL\0ADDRESS=MyServer\0NETWORK=dbmssocn\0"
"DATABASE=pubs\0";

rc = SQLConfigDataSource(NULL, ODBC_ADD_DSN, szDriver, szAttributes);


-Good luck!


QuestionSubclassing RichEdit? Pin
Richard Comish16-Apr-01 11:22
Richard Comish16-Apr-01 11:22 
GeneralIPicture Pin
orcun colak16-Apr-01 11:15
orcun colak16-Apr-01 11:15 
GeneralRe: IPicture Pin
Kannan Kalyanaraman16-Apr-01 18:27
Kannan Kalyanaraman16-Apr-01 18:27 
GeneralInvalid Address specified to RtlFreeHeap Pin
Rainer Mangold16-Apr-01 10:31
Rainer Mangold16-Apr-01 10:31 
GeneralRe: Invalid Address specified to RtlFreeHeap Pin
Michael Dunn16-Apr-01 16:28
sitebuilderMichael Dunn16-Apr-01 16:28 
GeneralRe: Invalid Address specified to RtlFreeHeap Pin
Rainer Mangold17-Apr-01 12:17
Rainer Mangold17-Apr-01 12:17 
GeneralMake dialog as Always on Top Pin
Ghasrfakhri16-Apr-01 5:16
Ghasrfakhri16-Apr-01 5:16 
GeneralRe: Make dialog as Always on Top Pin
16-Apr-01 8:33
suss16-Apr-01 8:33 
GeneralRe: Make dialog as Always on Top Pin
Liam O'Hagan18-Apr-01 15:10
Liam O'Hagan18-Apr-01 15:10 
Questionhow to Save Bitmap to file as jpg ot gif Pin
16-Apr-01 0:06
suss16-Apr-01 0:06 
AnswerRe: how to Save Bitmap to file as jpg ot gif Pin
Kannan Kalyanaraman16-Apr-01 0:29
Kannan Kalyanaraman16-Apr-01 0:29 
GeneralI have problem in creating and showing Bitmap of 16 -bit-colordepth!Please help me! Pin
hike15-Apr-01 21:36
hike15-Apr-01 21:36 
GeneralRe: I have problem in creating and showing Bitmap of 16 -bit-colordepth!Please help me! Pin
Christian Graus16-Apr-01 14:12
protectorChristian Graus16-Apr-01 14:12 
GeneralIP address ... Pin
Hadi Rezaee15-Apr-01 19:57
Hadi Rezaee15-Apr-01 19:57 
GeneralAccessing values from a VB DLL function Pin
kidrock15-Apr-01 16:51
kidrock15-Apr-01 16:51 
GeneralRe: Accessing values from a VB DLL function Pin
l a u r e n15-Apr-01 21:43
l a u r e n15-Apr-01 21:43 
Generalwrite to windows registry. Pin
Ghasrfakhri15-Apr-01 5:44
Ghasrfakhri15-Apr-01 5:44 

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.