|
Hi all
How can i Insert data of more than 4000 characters in clob datatype in oracle database?
I use this query to insert data.
INSERT INTO testing VALUES(utl_raw.cast_to_raw('SomeDATA'));
Then i am getting error
OraOLEDB Error: -2147217900
ORA-01704: string literal too long
IDispatch error #3092
Please help me
|
|
|
|
|
MsmVc wrote: INSERT INTO testing VALUES(utl_raw.cast_to_raw('SomeDATA'));
Have you tried replacing this with a string literal to see at what point it fails, something like:
INSERT INTO testing VALUES("12345678901234567890"); "One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thanks for reply
i try to this and i found when data is more that 2000 thousand then i am getting error.
INSERT INTO testing VALUES(utl_raw.cast_to_raw('0x151c2f'));
ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "SYS.UTL_RAW", line 224
|
|
|
|
|
See if the first two results from this search are of any help."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi guys,
Looking for some help...
In my application using VS2008 (MFC 9.0) + SP1, i encountered an error and i felt that it is of the MFC/Framework.
I am giving a very simple scenerio, and i hope amy body may reproduce it easyly.
Follow these steps: -
1. Create a new MFC Application Project.
2. The type i choose is MultiDoc Application with Doc/View Support and Office Project Style and Ribbon Menu
Here my View is derived from CScrollView.
Now i Run the Application and changed the theme, say to Silver and now i hibernated the PC. After Starting the PC i got that the application is in the default theme (BLUE). However as i checked the selected style in the menu, its still the Silver.
I an expecting any boddy will help me soon.
Regards
HarshHARSH
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
|
|
|
|
|
The CMFCVisualManagerOffice2007 reset any style to its default
const CMFCVisualManagerOffice2007::Style c_StyleDefault = CMFCVisualManagerOffice2007::Office2007_LunaBlue; value after the restart...
It would be not the case
when you would set your own (derivated) VisualManager
with the overwritten function virtual void OnUpdateSystemColors()
|
|
|
|
|
Thanks Eugen,
I'll try n let you know..HARSH
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
|
|
|
|
|
Hello,
I'm checking for the "SingleInstanceApplication" thro' EnumProcessModules()and if the process is available then call the TerminateProcess().
I'm looking for an help on SetForegroundWindow() of the application. Is there any method in CWinAppEx for Setting Foreground Window of the application when minimized or starting an application from the shortcut.
Thanks in advance,
Mayur M
|
|
|
|
|
Use a named Mutex to check for single instance.
The CreateMutex will create a mutex for the first instance.
For all subsequent instances CreateMutex fails with an error ERROR_ALREADY_EXISTS .
CWinApp has a m_pMainWnd member of type CWnd* .
There are functions available like CWnd::SetForegroundWindow , CWnd::BringWindowToTop , CWnd::ShowWindow etc. which will help you restore a window and bring it to the foreground.
From the second instance of your application send a custom message using RegisterWindowMessage so the first instance can respond to it and then terminate the second instance.
|
|
|
|
|
It may not be a good idea to enumerate for a process and terminate it if the intention is to avoid multiple instances. May be you can take a look at the following article: Avoiding Multiple Instances of an Application[^]
Regarding SetForegroundWindow(), if you have a pointer to the main window (or any top level window), you can call it like pMainWnd->SetForegroundWindow().
|
|
|
|
|
As others have pointed out you should use Mutex to avoid the multiple instances.
Here is code snippet how it will look(not tested)
HANDLE hMutexOneInstance = CreateMutex(NULL, FALSE, _T("Global\\MutexToAvoidMultipleInstances"));
DWORD dLastErr = ::GetLastError();
if(dLastErr == ERROR_ALREADY_EXISTS)
{
CWnd * pPrevCWnd = PreviousInstance();
if(pPrevCWnd != NULL)
{
need to check more :)[/edit]
LaunchPrevInstance(pPrevCWnd);
}
else {
AfxMessageBox("Only one instance is allowed.");
}
return FALSE;
}
Regards,
Sandip.
modified on Tuesday, February 16, 2010 3:34 AM
|
|
|
|
|
Thanks for your valuable reply...
By the way, I got how to avoid multiple instances. But the problem is to restore the minimized or inactive window, which is already running.
The functions like ::BringWindowToTop(), :: SetForegroundWindow(), ::ShowWindow() needs HWND value as parameter. But the problem that i don't have any HWND value ,because we are not using any CFrameWnd derived class.
Could you please suggest me how to show my minimized or inactive application window.
Thanks in advance...
|
|
|
|
|
Hello Sirs
how to insert text into an avi file?
there's a filter that does this, aware motion ... something,
but i wanted to know how to do something like that,
any help would be very ... um, Confused ... helpfull
thanks Failure is Success If we learn from it!!
|
|
|
|
|
I'll assume you mean you want to do that programatically using (V)C++, otherwise you wouldn't be asking here. Imho take a look at writing directshow filters[^] for starters, i hope that will help. > The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Thanks for your replay !
i need to split I frames and P-frames in avi file and how to insert text into avi file.So please help me .. Failure is Success If we learn from it!!
|
|
|
|
|
I don't know what I and P frames are, sorry, i'm not much into video editing in details. To insert text i would write my own filter which takes the incoming frame, writes its text on it and then passes it along the graph (so it would have 1 input pin for incoming video frames and 1 output pin which passes the frame along after writing text onto it), i think video frames are (usually) passed as DIBs (Device Independent Bitmaps), so you should be able to use GDI (or GDI+) functions to write text onto these before letting them continue their journey.
[edit] And of course, insert my filter into the filter graph by building the graph "manually". [/edit]> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
modified on Tuesday, February 16, 2010 6:15 AM
|
|
|
|
|
|
I don't know of any samples, but google is your friend... > The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Thanks Failure is Success If we learn from it!!
|
|
|
|
|
I have an MFC application that allows display of different types of objects. It also allows conversion of these objects to other types. The application is an MDI app. I'd like to be able to script the application. If I pass no command line parameters then it runs as a GUI application. If I type command line arguments then I would like it to run as a console application where it performs some work without returning until its done(basically convert one object to another).
I tried putting code in the init_instance but the program returns to the command prompt immediately and the operation is done by a spawned process.
Basically I want my cake and eat it too. I want a console app if command line is present otherwise a GUI application.
I've tried looking for a number of hours a few different times but always fine people talking about command line parsing for an MFC GUI application.
Can someone help me get started, maybe a few pointers?
Thanks
|
|
|
|
|
I have tried that, and now I convinced myself it can't be done, at least if you refuse any flashing window while running in command mode. The reason why is burried deep in the EXE file format, which holds one bit flagging console apps. When the flag is set, your app will run inside an existing console window and perform I/O in there; or when run outside a DOS window, it will create a new console and use it. When a Windows app runs, it will not send its output to an existing console.
So either you set the bit and the app will create a console window, even when you want Forms; or you don't set the bit, and your app will never use the console that launched it.
The "solution" is to build basically the same code twice, and deliver two almost identical EXE files! Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
I believe you can use the AllocConsole[^] function to create and attach a console.
If there are no command line parameters, you can do DoModal and if there are command line parameters you could do an AllocConsole .
Here is an excerpt from the documentation -
This function is primarily used by graphical user interface (GUI) application to create a console window. GUI applications are initialized without a console.
|
|
|
|
|
Member 381289 wrote: I want a console app if command line is present otherwise a GUI application
It is not an MFC problem: a console APP and a GUI app are linked differently and have different entry point from the kernel, that provides them some stdin/stdout services or not.
You can have a console app that has a GUI (it has a main and then creates windows, but it will retain a console until it run - you can eventually hide it) or you can have a GUI app (it has a WinMain ) that has a console (see <<superman>> post down up here.
Note that in MFC GUI apps, WinMain is linked by the MFC library, but exist: it calls the application object methods.
In any case, if you have to be able to hold and redirect the stdin/stdout streams, you must have a console app.
What I typically do in this case, is to breack the application in thre modules:
- A DLL that describe the applicatiomn data and semantics and related "commands"
- An Exe that links the DLL, that provides all the GUI stuff, invoking the DLL "commands"
- An Exe that links the DLL, that provides all the command line parsing stuff, once again invoking thos DLL "commands".
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hello, I need my MFC DLL to know what it's current path is. Referencing __targv[0] doesn't help because it only gives me the full path to the exe that links to my DLL. Any suggestions?
|
|
|
|
|
HMODULE hmod = GetModuleHandle(TEXT("OLComDll.dll"));
TCHAR szPath[MAX_PATH + 1] = {0};
DWORD dwLen = GetModuleFileHName(hmod, szPath, MAX_PATH);
|
|
|
|