|
And DSN's are just about competely useless in todays environment...
Unless you're actually going for lower performance and a more "generic" approach to database work.
|
|
|
|
|
Dave Kreskowiak wrote: And DSN's are just about competely useless in todays environment... Unless you're actually going for lower performance and a more "generic" approach to database work.
Okay, i am interested! What makes you say so
What is the better alternative?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
|
|
chandu004 wrote: ...is there any method to automate the creation of DSN...
Yes, but why not just use a DSN-less connection?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
To configure data sources programatically, see
Installing and Configuring the ODBC Software[^]
particularly the sections "Configuring Data Sources" and "Registry Entries for Data Sources".
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
What can I do to prevent the following:
Invalid Cursor State Error with the MS Oracle ODBC Driver
I have visited this link: Invalid Cursor State[^] and tried what they suggested, i.e: If using the ODBC API directly, call SQLPrepare() before calling SQLExecute() and SQLExtenedFetch() to refresh the recordset. But it is not working, I still receive the error. I have notied that if I create a new recordset for each sql statement is works, but that creates huge memory leaks.
Can anyone please help me ???
Many Thanks
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi All,
In my project I want to check Whether user press Enter key or not after type a text in text box. In which event I have to check it and how can i check it.
Thanks in Advance
Atul
|
|
|
|
|
try using the pretranslatemessage handler.
but here, you have to implement your own logic.
any mmore clarification required, get back.
|
|
|
|
|
What type is the project?
Maxwell Chen
|
|
|
|
|
|
Did you use of PreTranslateMessage .
|
|
|
|
|
The use of PreTranslateMessage() *might* work, but most implementations are incorrect. The other downside is that it permanently ties the child control to the parent. A better solution is to derive a class from CEdit . Override the OnGetDlgCode() method and return DLGC_WANTALLKEYS . Then override the OnChar() method like:
void CMyEdit::OnChar( UINT nChar, UINT nRepCnt, UINT nFlags )
{
switch (nChar)
{
case VK_RETURN:
GetParent()->SendMessage(some_custom_msg, GetDlgCtrlID(), (LPARAM) this);
return;
}
CEdit::OnChar( nChar, nRepCnt, nFlags );
} When the edit control "sees" the Enter key, it posts a message to the parent indicating such. The parent can then respond accordingly, if at all.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How early can a Windows service start up?
Comparing the below:
1) a Windows service application (an NT service),
2) a PCI bus device driver,
Can a Windows service be started up earlier than a PCI bus device driver?
Maxwell Chen
|
|
|
|
|
Hi
i am feel little bit shame for asking this question.
Actually i am making a application in VC++(MFC) single dilog based
in form view. I want to close the maximizeproperty of form
I mense i can minimize form but not maximize. Can any one told me how
we can do this.
Regard's
Kaushik
|
|
|
|
|
Right click on the form to see the properties of form.
Open styles tab, check minimize box and uncheck Maximize box.
|
|
|
|
|
sir ji
My application type of Single dialog based
and its style is Child and border is thin
In this case maximize and minimize property is
disable.
Can u told me any alternative way..............
Regard's
Kaushik
|
|
|
|
|
write this line in OnInitDialog function.
ModifyStyle (NULL, WS_MINIMIZEBOX);
Hope this will work.
By the way, why don't you just change your dialog style from child to popup ?
|
|
|
|
|
I know about the Two ways of making the .DLL.
1)extern "c" _declspec(dllexport) funX() {} and
2)Throught .Def file in which we are Writing only function names we want to export
EXPORT<br />
FunX @1
I have Some Question about that.
1)What is/are the diffn betn them and
2)What mean by extern "c"
3)"@" what is indication of this symbole. I tried without it and Dll Works Fine.
|
|
|
|
|
1) AFAIK, they are the same (but I'm not absolutely sure). You can have a look here[^]
2) extern "C" is needed when your dll is used in language other than C++. In C++, you have what is called function overloading (two functions with the same name and different arguments can exist). To resolve ambiguities, the linker uses decorated names to identify the different functions: it uses the function name ans some 'cryptic' characters that represent the arguments of the function. If you want to load a dll with LoadLibrary and use GetProcAddress, you have to supply the decorated name of the function, which is not very convenient.
So, using extern "C" means that the linker will use a C linkage (in C, you don't have function overloading) to identify the function: only the name is used.
This also means that you cannot overload your functions with extern "C".
|
|
|
|
|
From MSDN -
A module-definition (.def) file is a text file containing one or more module statements that describe various attributes of a DLL. If you are not using the __declspec(dllexport) keyword to export the DLL's functions, the DLL requires a .def file.
If you have functions in a DLL written in C++ that you want to access from a C-language module, you should declare these functions with C linkage (extern "c") instead of C++ linkage. Unless otherwise specified, the C++ compiler uses C++ type-safe naming (also known as name decoration) and C++ calling conventions, which can be difficult to call from C.
Moral of the story -
A .def file is required if you are not using __declspec(dllexport) keyword.
extern "c" stops the compiler from decorating the function names.
|
|
|
|
|
i am using Dialog based MFC application.
simple application i have create is add new node in Tree-view as text specified in edit box.
now problem is that when i am adding i dont want duplicated node being added to Tree-view.
i should get reference to already existing node when i try to add node with same text.
Help needed : how to search node in tree-view ..
|
|
|
|
|
You can use HTREEITEM hKid = GetChildItem (hParent); in a loop to get all the children of a parent, but the better idea is to maintain a array of nodes or labels that are already added in the tree.
You can search in the array to check if this node or label is already added.
If you want to check the labels, then it's always good to use CMapStringToString class, as you can directely check if the string is there or not. (In array, you have to search the whole array to find if item is there or not)
|
|
|
|
|
You have to search the node using GetNextItem. It will return the HTREEITEM. If the text is same, you can call SetItemState for that node
- NS -
|
|
|
|
|
Thank you ...
i am sooo that no direct function available ....
|
|
|
|