|
anilFirst wrote:
How I copy a file from my local machine to a webserver.
You can use HTTP or FTP for this. The Web server has to be configured to accept files, however.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
How to hide standard toolbar in my simple appliation by default?
When I run my application it is showing the standard toolbar and status bar. at first time I like to hide these 2. After my selection in menu then only these toolbars should be appear. how to make it. Thanks.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Just remove the WS_VISIBLE style during creation of the toolbar inside the OnCreate function.
Nibu thomas
Software Developer
|
|
|
|
|
Ya. Working. Thanks.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Hi,
Use ShowControlBar()
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
I declare a Command like this :
CCommand<caccessor
<cdboarticle1accessor> >tabmiki; and I open it like this :
hr = tabmiki.Open(session, "SELECT * FROM article1 ", NULL);
And in my form I put to buttons(NEXT, and Previous) in side I write tabmiki.movenext() and tabmiki.moveprev().
movenext() works but moveprev() don't works, I don't know why
Can you help me ?
I learn my self
-- modified at 0:59 Wednesday 1st March, 2006
|
|
|
|
|
What is CdboARTICLE1Accessor ?
mikobi wrote: Can you help me ?
Probably not, since you failed to provide anything useful. You need to set a breakpoint in the moveprev() method and then single-step through it until you find the statement(s) that does not work. Otherwise, it could be any number of things, and you'll end up "chasing a rabbit" as a result.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I am using SQL SERVER 2000 as database;
CdboARTICLE1ACcesor is an Class Accesor i generate from ARTICLE1 table.
|
|
|
|
|
I dont know how to connect with SQL server 2000 and retrive the data?
i belive that u can help me.
thanks in advance
JAYARAJ
|
|
|
|
|
To retrieve data from SQL SERVER, make first an Accessor.Do that in your project workspace:
Click on Insert -> New ATL Object; in catégories choice Data Access->Consumer from here enter the name of your database; password;choice command and click on ok after choice the table you want to access, click in ok again.
Here a Class Accessor is generate.
Now in your event write this code :
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
HRESULT hr;
CDataSource db;
CDBPropSet dbinit(DBPROPSET_DBINIT);
CString strItem;
int k = 0;
CSession session;
CString strCommand,strSql;
dbinit.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR("yhwha"));
dbinit.AddProperty(DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, false);
dbinit.AddProperty(DBPROP_AUTH_USERID, OLESTR("sa"));
dbinit.AddProperty(DBPROP_INIT_CATALOG, OLESTR("STOCK"));
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, databas);
dbinit.AddProperty(DBPROP_INIT_LCID, (long)1036);
dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
hr = db.Open(_T("SQLOLEDB.1"), &dbinit);
if (FAILED(hr))
{
AfxMessageBox("impossible d'ouvrir la baseo");
}
else
{
hr = session.Open(db);
if (FAILED(hr))
{
AfxMessageBox("session non Ouverte");
}
else
{
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_CANFETCHBACKWARDS, true);
propset.AddProperty(DBPROP_IRowsetScroll, true);
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE );
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
CCommand<caccessor<cdbotabcmdeaccessor> >cmde ;
CCommand<caccessor<cdborequisitionaccessor> >req ;
CCommand<caccessor<cdbodemprixaccessor> >dem ;
CCommand<caccessor<cdbodetcmde2accessor> >det ;
CCommand<caccessor<cdbodetlivaccessor> >liv ;
CString str1,str2,str3,str4,str5,str6,str7,str8,str9,str0 = "";
int i = 0;
strCommand = "select * from detcmde where numreq = '%s'";
strSql.Format(strCommand,m_numcmde);
hr = det.Open(session, strSql,NULL);
if (det.MoveFirst() != S_OK)
{
|
|
|
|
|
i got error as
error C2065: databas: undeclared identifier in
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, databas);
may i know why thise error occur?
JAYARAJ
|
|
|
|
|
It's true that you have this error because databas is a CString variable that contain the path of the database for example
CString databas = "SEM1" .
If you point mouse on the sql server Icon at bottom of the screen, you will see like this :Running- \\SEM1 MSSQLSERVER
SEM1 is the name of my database path.
In my second pc i have this Running- \\sem2\sem1 and here the path name is
"SEM2\\SEM1":
you can declare CString databas = CString "SEM2\\SEM1";
You will be happy
|
|
|
|
|
it is true;
I have declare this before :
CString databas = CString("SEM1"); It's the name of the databas path. You will the name of databas when you point the mouse on the icon of sql server on the bottom of the screen I see Running- \\SEM1 MSSQLSERVER
In the second pc i have Running- \\SEM2\SEM1 and in this condition the name of the path is "SEM2\\SEM1"
You will be happy
|
|
|
|
|
hello mikobi,
i like to display the table in my text area on clicking ok button.
my database server is in ist17
my database name is IstEncoder
my table is user_details
is my path is correct ?
what modificaton i should do in your code.
thanks in advance
=============================================================================void CDatabaseDlg::OnOK()
{
// TODO: Add extra validation here
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
HRESULT hr;
CDataSource db;
CDBPropSet dbinit(DBPROPSET_DBINIT);
CString databas = "ist17";
CString strItem;
int k = 0;
CSession session;
CString strCommand,strSql;
dbinit.AddProperty(DBPROP_AUTH_PASSWORD, OLESTR("yhwha"));
dbinit.AddProperty(DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, false);
dbinit.AddProperty(DBPROP_AUTH_USERID, OLESTR("sa"));
dbinit.AddProperty(DBPROP_INIT_CATALOG, OLESTR("STOCK"));
dbinit.AddProperty(DBPROP_INIT_DATASOURCE, databas);
dbinit.AddProperty(DBPROP_INIT_LCID, (long)1036);
dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
hr = db.Open(_T("SQLOLEDB.1"), &dbinit);
if (FAILED(hr))
{
AfxMessageBox("impossible d'ouvrir la baseo");
}
else
{
hr = session.Open(db);
if (FAILED(hr))
{
AfxMessageBox("session non Ouverte");
}
else
{
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_CANFETCHBACKWARDS, true);
propset.AddProperty(DBPROP_IRowsetScroll, true);
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE );
bool bsavevalidation = true;
CWnd::UpdateData(bsavevalidation);
CCommand >cmde ;
CCommand >req ;
CCommand >dem ;
CCommand >det ;
CCommand >liv ;
CString str1,str2,str3,str4,str5,str6,str7,str8,str9,str0 = "";
int i = 0;
strCommand = "select * from detcmde where numreq = '%s'";
strSql.Format(strCommand,m_numcmde);
}
CDialog::OnOK();
}
}
=============================================================================
My Error -------------------------------------------------------------------------------------------------------------------------------------------------
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2143: syntax error : missing ';' before '>'
error C2065: 'm_numcmde' : undeclared identifier
JAYARAJ
|
|
|
|
|
hi friends,
can anyone help me or guide me to create installable packages for the projects which i do in Visual c++ or visual basic.
i need to know what are the files to be packed with the execultable file and how to pack them.
Vasanth.
|
|
|
|
|
Hi,
For Visual Basic you can use the package and deployment tool to create installable package.
For Visual C++ - try InstallShield or free installer InnoSetup
InnoSetup[^]
These installers provide good wizards and take care most of the packaging operations.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
hi
i have created a dialog based MFC application.
But when i compile i get the following error
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
this is due to the following code in AFXV_W32.H (which ships with VC6)
#ifdef _WINDOWS_
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
#endif
how to fix it?i didn't define _WINDOWS_ anywhere in my code but it still throws up the error
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 0:48 Wednesday 1st March, 2006
|
|
|
|
|
QuickDeveloper wrote: fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
MFC Applications should not include windows.h as MFC includes it internally.
Nibu thomas
Software Developer
|
|
|
|
|
i did not include windows.h anywhere,even then it throws the error
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
What are the headers that you have included?
Nibu thomas
Software Developer
|
|
|
|
|
i included the following files in stdafx.h.i did the application by reading this article
http://www.codeproject.com/com/clientserverwithdcom.asp[^]
//the following files are included in stdafx.h which is in dialog based Client Application.
#import "..//DCOMServer/DCOMServer.tlb" //here DCOMServer is the name of service created using Appwizard.
#include "afxctl.h"
#include "objbase.h"
#include "initguid.h"
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 1:34 Wednesday 1st March, 2006
|
|
|
|
|
This is how windows.h is included in MFC...
afxwin.h
--afx.h
---afxver_.h
----afxv_w32.h
-----windows.h
Nibu thomas
Software Developer
|
|
|
|
|
In the output window, what .cpp file is being compiled when the C1189 error is produced? What other #include statements do you have besides those in stdafx.h ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Hello. I want to call the DrawGLScene() function inside an opengl window found on one of my dialog boxes. The fucntion is supposed to draw a terrain inside the window but all im getting is a black screen. when i integrate a simple opengl code, like one for drawing a triangle, it works (i.e. the triangle is displayed in the window). if we create a separate opengl window for diaplaying the terrain, it works perfectly. my problem is to integrate the terrain code inside a window found inside my dialog box. please help!!
dila
|
|
|
|