|
If your using Installshield there is a wizard to set ODBC data sources, or you can set it in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
|
|
|
|
|
|
Can anyone help me in my school project?I'm a beginner at microsoft visual c++ any need help in doing a program.I would appreciate it if anyone is willing to help me doing it.Thanks alot!
|
|
|
|
|
Code Project is not a place for make your HomeWork, but We can help you making the Alpha Version, of your Project.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
What type of help do you need Ramzirex?
Please be specific, and post direct questions.
|
|
|
|
|
You get points for saying up front you are doing homework. You lose points for asking the same question twice instead of taking the advice you were given the first time. Asking if people will help you without saying what you want is pointless - by all means when you have an actual question about the project you are working on, post it and I'm sure we will be glad to help.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi All!
I'm using Tree Control in my dialog and CTreeCtrl in my class
to handle it. I put in this Tree objects, so you can click on them
and view their attributes. User is allowed to mark both objects and
attributes using checkboxes inside tree (I use the TVS_CHECKBOXES style).
My problem is: when you've marked attribute of any object, and after that
collapse the tree, you can't see: have you any checked attributes inside or not. The best decision, I think, would be use tri-state checkboxes (marked, unmarked, partially-marked). I saw these things in installation programs.
The question is: Is there any way to do it inside Tree control?
Or I need to create my own image list with three bitmaps, attach it to my tree control and handle messages on it?
|
|
|
|
|
I needed to do that, And I used the ame Idea. I use a Bitmap with the three states. I Ask for the state of each child item and I decide the bitmap to use.
Cheers.
Carlos Antollini.
|
|
|
|
|
Hi,
I have a child dialogs which is created form the main dialog. Child dialog contains system icon and system menu. I like to disable minimize and remove maximize from the child window's system menu.
Thank You!
|
|
|
|
|
Hello!!
I have a window which covers teh full screen.. I do not want the image on the window to be disturbed. It will be disturbed if teh user presses the windows key i.e. the key which activates the start menu.. Can I disable this key.. In short the user should not be able to disturb teh image by pressing this key..
Please advise how???
Sandeep
|
|
|
|
|
Use SystemParametersInfo()
|
|
|
|
|
Hi all,
does anyone know how to obtain info stored in the resource.
I would like to show the version number / company name … in the about dialog box of my app. (so how can i access to the resource VS_VERSION_INFO of my mfc app?)
Any idea?
thanx in advance
Armin Zürcher
|
|
|
|
|
bool GetDllVersion ( LPTSTR szDllFilename, CString& sProductVersion )
{
DWORD dwHandle, dwInfoSize;
BYTE* pBuffer;
void* pvVersion;
UINT uBufLen;
dwInfoSize = GetFileVersionInfoSize ( szDllFilename, &dwHandle );
if ( 0 == dwInfoSize )
return false;
pBuffer = new BYTE [dwInfoSize];
if ( NULL == pBuffer )
return false;
__try
{
if ( 0 == GetFileVersionInfo ( szDllFilename, dwHandle, dwInfoSize, pBuffer ))
return false;
if ( 0 == VerQueryValue ( pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"),
&pvVersion, &uBufLen ))
return false;
sProductVersion = (LPCTSTR) pvVersion;
}
__finally
{
delete [] pBuffer;
}
return true;
}
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Thanks for your fast reply ,
but the code fails in the following line:
if ( 0 == VerQueryValue (pBuffer, _T("\\StringFileInfo\\040904B0\\ProductVersion"), &pvVersion, &uBufLen ))
is there something different when I use a german file?.
When I view the *rc file it looks like:
BLOCK "StringFileInfo"
BEGIN
BLOCK "040704e4"
BEGIN
(… all other values)
VALUE "ProductVersion", "1.0.0.1"
Perhaps I’ve to change the string from _T("\\StringFileInfo\\040904B0\\ProductVersion") to
_T("\\StringFileInfo\\040704e4\\ProductVersion").
It doesn’t work too – did I miss something?
Thanks again,
Regards
Armin Zürcher
|
|
|
|
|
hmm, I'd expect that changing the number to 040704e4 would make it work, since that is just the hex value of your language ID.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
uh..
it was my fault, the right block header for the dll is 040704B0.
(040704E4 was the block header of the app)
Armin Zürcher
|
|
|
|
|
Hi !
I'm trying to catch a keyboard input (WM_KEYDOWN) in a CDialog box.
The OnKeyDown method works in a CView derived class, but not in a CDialog dervied class.
Could anyone help me about that ?
Thank you !
Damien
|
|
|
|
|
WM_KEYDOWN messages are directed to child window that currently has a focus, not to the dialog itself. Override PreTranslateMessage to handle keyboard in dialog class.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi there!!
I want to recreate a stored procedure when i pass it to the SQL server with ADO.
I found a example at MSDN, but its to much code. I wonder if there are any easier way to do this?
MSDN example:
_bstr_t bstrCreate ( L"create proc sp_AdoTest( @InParam int, "
L"@OutParam int OUTPUT ) "
L"as "
L"select @OutParam = @InParam + 10 "
L"SELECT * FROM Authors WHERE "
L"State <> 'CA' "
L"return @OutParam +10" );
_bstr_t bstrDrop ( L"if exists "
L"(select * from sysobjects where "
L"id = object_id('dbo.sp_AdoTest') and "
L"sysstat & 0xf = 4)"
L"drop procedure dbo.sp_AdoTest" );
_bstr_t bstrSP ( L"sp_Adotest" );
Conn1.CreateInstance( __uuidof( ADODB::Connection ) );
Conn1->ConnectionString = bstrConnect;
Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty, -1 );
// Drop procedure, if it exists & recreate it.
Conn1->Execute( bstrDrop, &vtEmpty, ADODB::adCmdText);
Conn1->Execute( bstrCreate, &vtEmpty, ADODB::adCmdText);
Thank all folks out there who taking the time to help me!!
|
|
|
|
|
You need to create the Store procedure in the SQL Server with ISQL,
Run the script, in ISQL, then grant the permits.
Please ask me.
Let me make a question. Do you need to create the Stored with ADO from your program?
Or you can do the stored previously?
Best Regards
Carlos Antollini.
|
|
|
|
|
I soloved the Problem now, thanks anyway.
Yes i need to create the stored Procedure inside ADO/COM object because theres no administration tools to the database, and the com object will change several times and then we send client application and object to consumers.
|
|
|
|
|
Since this is posted in the Visual C++ forum it is safe to assume you are using C++.
I am always curious as to why people who are coding in C++ would chose to use ADO rather than OLE DB or ATL OLE DB?
|
|
|
|
|
I have been trying to find VC++.NET OLE DB Unmanaged Code samples but cannot.
Can you point me in the right direction. I create a New OLE DB program with the wizard, it creates the OLE DB Consumer Template, but when it comes to saving the data I cannot figure out how.
Peace in Christ
Marco Napoli
http://www.ourlovingmother.org
|
|
|
|
|
What do you need?
Regards....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I am looking for sample code on VC++.NET OLE DB Unmanaged code using OLE DB Consumer Tamplates.
The problem I am having so far is the saving. Below is the code I use to save.
CString mValue;
GetDlgItemText(IDC_EDIT_FIRST, mValue);
strcpy(m_pSet->m_First,mValue);
HRESULT hr ;
hr = m_pSet->SetData();
hr = m_pSet->Update();
When I trace the above code, I can see the new value in the m_pSet->m_First field, but neither the SetData() or the Update() save to the SQL Server Database.
Marco
|
|
|
|