|
CString sql="insert into employee values('a',1); insert into employee values('b',2);";
m_db.ExecuteSQL(sql);
this doesn't work!
but
m_db.ExecuteSQL("insert into employee values('a',1); ");
do work! why!
|
|
|
|
|
I think the sql string is valid. I don't know where is wrong?
|
|
|
|
|
Not sure if this works for tables, but try
create or replace ....; instead of the
drop ...; create ...; I use this all the time for views and procedures. I think it works for tables too.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
do you mean it should looks like below:
CString sql="create or replace table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
instead of
CString sql="drop table employee cascade constraints create table employee (name varchar2(90) not null, ID number(6) not null);";
m_db.ExecuteSQL(sql);
How about the 2nd questions?
|
|
|
|
|
Sorry I was wrong, for tables, the 'create or replace' can not be used. I think what you have to code it like the following
CString sql = "drop table employee cascade constraints";
m_db.ExecuteSQL(sql);
sql = "create table employee(name varchar2(90) not null, id number(6) not null)";
m_db.ExecuteSQL(sql);
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Does anyone know how to create a window with the familiar grey canvas/workspace which can house multiple windows which can be restored, maximized and minimized?
|
|
|
|
|
|
Hi all,
Do anyone has some idea on how to implement a toolbar with right- or center-aligned buttons (not the right-aligned text on buttons) with Visual C++?
Looking forward to your warmly reply.
|
|
|
|
|
I'm trying to activate profiling in Visual C++ 6.0.
I've activated Settings->Link->General->Enable Profiling tab.
However Build ->Profile is still greyed out!
|
|
|
|
|
I want to handel WM_MOUSEMOVE message and change color of picture when mouse is over them but my program didn't work and stop working after some minutes
plese help me
thanks a lot
|
|
|
|
|
Can you post the code of your WM_MOUSEMOVE handler?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
You could create a region around the picture and then use PtInRegion in your WM_MOUSEMOVE handler to check if the mouse is over the picture. If it is then you can make the alterations to the picture, if not leave it as is.
Hope this is of some help.
|
|
|
|
|
Hi everybody. Some of you helped me quite a lot since I became a Code Project member. Some of you also know that this help of yours goes in a good cause: I'm working at a freeware which I consider that will be my gift to all of you people that help others on forums. It's not something spectacular, but not something little either.
In the meantime however, I decided that I can give something back sooner, since my freeware is still not completed. An article. I'm thinking about writing an article about how to link Visual C++ with a VB application and viceversa. With all sorts of neat tricks that I learned in the past months. This could be a good resource for programmers that know both languages and want to benefit from the advantages of linking them.
Before I write my article I have one more final question. So that I don't write stupid things.
Is it possible to call a function in a Visual Basic EXE (Application) from a Visual C++ EXE while both applications are running?
OR: Is it possible to call a function in ANY exe from Visual C++? Not necesarily a VB. Something else.
I KNOW that calling a function in a VB DLL, FROM Visual C++ IS possible. But I need to know if this stands true for EXE.
Please answer only if you know the absolute sure answer. Your answer will influence me about how to write the article.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote:
I KNOW that calling a function in a VB DLL, FROM Visual C++ IS possible. But I need to know if this stands true for EXE.
Nope, Unless EXE is ATL SERVER Executable!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
This is a general answer, cause like a lot of things the devil is always in the details. But you can call a function from any executable file when coding in any environment if the following three conditions can be met.
1) The function is exported from the executable file.
2) The calling convention of the function is known and your programming environment supports that calling convention.
3) The signature of the function is known. ie. What does the function return, what is it's name and what parameters does it require.
Usually, regardless of the file being an EXE, a DLL or any type of executable, if you can satisfy all three of the above you should be able to call the function. Oh and if I've forgot something, just blame it on my three Guinness lunch.
Oh and good luck with your article.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Hm. But Visual Basic can't built EXE like C++. C++ I know that has that "def" file which can allow you to specify export functions. Or you can use "dll_export" or something like this. So practically, the only way you can call a function from VB is to make some DLL, not EXE.
Right?
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote:
So practically, the only way you can call a function from VB is to make some DLL, not EXE.
Nope, You can call Method/Property from Interface exposed by OutProcess Server Executable (i.e. Executable based COM/ATL)!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
i am having a dialog. i am displaying a bitmap using picture control on the dialog.i am editing the bitmap using pen tool and fill color tools etc. i want to save this edited bitmap in icon and bitmap format. are there any articles on this.
regards
laiju
|
|
|
|
|
i have an instance of OpenCv image library where a struytue is defines as
typedef struct _IplImage {
int nSize; /* size of iplImage struct */
int ID; /* image header version */
int nChannels;
int alphaChannel;
int depth; /* pixel depth in bits */
char colorModel[4];
char channelSeq[4];
int dataOrder;
int origin;
int align; /* 4- or 8-byte align */
int width;
int height;
struct _IplROI *roi; /* pointer to ROI if any */
struct _IplImage *maskROI; /*pointer to mask ROI if any */
void *imageId; /* use of the application */
struct _IplTileInfo *tileInfo; /* contains information on tiling
*/
int imageSize; /* useful size in bytes */
char *imageData; /* pointer to aligned image */
int widthStep; /* size of aligned line in bytes */
int BorderMode[4]; /* the top, bottom, left,
and right border mode */
int BorderConst[4]; /* constants for the top, bottom,
left, and right border */
char *imageDataOrigin; /* ptr to full, nonaligned image */
and is used in the main as
int main( int argc, char** argv )
{
IplImage* src;
my question what exactly does the underscore before the IplImage structure represent.
regards
|
|
|
|
|
prat78 wrote:
what exactly does the underscore before the IplImage structure represent
nothing. an underscore is just another character you can use in variable names - it has no special meaning in C/C++.
whoever created the IplImage structure might have been following some coding standards that gave special significance to names that start with underscore (similar to the Hungarian notation for naming variables to reflect their type: bool bFlag; int iCounter; CString csText;, etc). but that is something you'd have to figure out from whatever documentation you have.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
prat78 wrote:
my question what exactly does the underscore before the IplImage structure represent.
It frequently means that the object is Microsoft-specific, or that it is used internally.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
In going over to Visual Studio 7, I get a new error.
CArray, GetSize() returns an INT_PTR instead of an int.
Up until now an int was a 32 bit number.
What is an INT_PTR?
For my applications a 32 bit integer is enough.
Can I somehow globally define something to get rid
of this warning?
Thanks,
Ilan
|
|
|
|
|
IlanTal wrote:
What is an INT_PTR?
Pointer to Integer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|