|
It is explained here[^] in the MSDN documentation. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I didnt get the clear picture from MSDN.
Could u brief it?
Thanks
|
|
|
|
|
Hi all
I am trying to fetch data from ORACLE.Connection part is working.When i try to fetch the data then i am getting error.
Microsoft OLE DB Provider for Oracle Error: -2147467259
Data type is not supported.
Unspecified error
I am trying give some details.
Table
CREATE TABLE "SYSTEM"."TEST" ( "OID" RAW(16), "EVENTID" NUMBER NOT NULL ,
"NAME" VARCHAR2(30) NOT NULL , "TABLE_OBJNO" NUMBER NOT NULL ,
"USAGE" NUMBER NOT NULL , "ENABLE_FLAG" NUMBER NOT NULL ,
"MAX_RETRIES" NUMBER, "RETRY_DELAY" NUMBER, "PROPERTIES" NUMBER,
"RET_TIME" NUMBER, "QUEUE_COMMENT" VARCHAR2(2000),
"SUBSCRIBERS" "SYS"."AQ$_SUBSCRIBERS", "MEMORY_THRESHOLD" NUMBER,
"SERVICE_NAME" VARCHAR2(64), "NETWORK_NAME" VARCHAR2(256),
CONSTRAINT "AQ$_QUEUES_CHECK" UNIQUE ("NAME", "TABLE_OBJNO") VALIDATE ,
CONSTRAINT "AQ$_QUEUES_PRIMARY" PRIMARY KEY ("OID") VALIDATE ) TABLESPACE "SYSTEM" PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 64K FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) LOGGING
Through this way i am trying to fetch the data.
CString tabledetail="Select utl_raw.cast_to_varchar2("OID"),"EVENTID","NAME",
"TABLE_OBJNO","USAGE","ENABLE_FLAG",
"MAX_RETRIES","RETRY_DELAY","PROPERTIES","RET_TIME","QUEUE_COMMENT",
"SUBSCRIBERS","MEMORY_THRESHOLD","SERVICE_NAME","NETWORK_NAME" from system.TEST";
try
{
pRecordset=m_pConn->Execute(_bstr_t(tabledetail), 0, adCmdText);
}
catch(_com_error pCE)
{
CString error;
error.Format(_T("\n%s Error: %ld\r\n%s\r\n%s\r\n"),(TCHAR*)pCE.Source(),pCE.Error(),(TCHAR*)pCE.Description(),(TCHAR*)pCE.ErrorMessage());
AfxMessageBox(error);
}
Please help me where i am wrong.
|
|
|
|
|
I would look at
MsmVc wrote: "SUBSCRIBERS" "SYS"."AQ$_SUBSCRIBERS"
- Im not sure that has a mapping from Oracle to OLE DB - not sure what you do to get around it -
everything else you specify has raw, number, varchar2 etc which seem ok.
Do a test - remove the
MsmVc wrote: "SUBSCRIBERS"
from the query
MsmVc wrote: CString tabledetail="Select utl_raw.cast_to_varchar2("OID"),"EVENTID","NAME","TABLE_OBJNO","USAGE","ENABLE_FLAG","MAX_RETRIES","RETRY_DELAY","PROPERTIES","RET_TIME",
"QUEUE_COMMENT","SUBSCRIBERS","MEMORY_THRESHOLD","SERVICE_NAME","NETWORK_NAME" from system.TEST";try
and see if it chucks a farley then - if it works, thats the issue !
'g'
|
|
|
|
|
yes you are right.I had check remove the "SUBSCRIBERS" column then it's working fine.But Can you tell me some different way to do that because we can't remove column.I think it's "SUBSCRIBERS" a use define data type.
If you have different idea then plz help me
|
|
|
|
|
pretty sure you cant do anything with Oracle AQ through the OLE DB Layer - you might have to use OCI - you might want to check the Oracle dev site for what the .NET client offers as well
'g'
|
|
|
|
|
thanks for vital information...
|
|
|
|
|
one more problem when data type is LONG RAW.Then i am getting error.
Microsoft OLE DB Provider for Oracle Error: -2147217900
ORA-00997: illegal use of LONG datatype
IDispatch error #3092
|
|
|
|
|
iirc, in Ora 8i and above, LONG RAW is deprecated, and they are a pretty restricted use data type anyway - the closest equivalent is a blob.
You would have to read the Oracle manuals on how to deal with them, I dont think OLE DB Maps them - leastwise a quick look doesnt show anything useful - possibly you might get a variable array of bytes back, up to 2 GB in length
have a look at using TO_LOB to go from a LONG RAW to a BLOB
'g'
|
|
|
|
|
|
|
How can i use this?
Wheb i am useing like this
INSERT INTO "SYSTEM"."DEMO" VALUES('6565',0.0,TO_LOB('0001'),5000.0,0.0051,'5665','57');
Then show error.
ORA-00932: inconsistent datatypes: expected - got CHAR
Please help me
|
|
|
|
|
I want to get HWND from process id. Below function return correct HWND in XP but not in Vista and Win7.
How to get HWND in Vista?
HWND CQemuConfig::GetWindowHWND(DWORD dwProcessID)
{
HWND h = ::GetTopWindow(0 );
while ( h )
{
DWORD pid;
DWORD dwTheardId = ::GetWindowThreadProcessId( h,&pid);
if ( pid == dwProcessID)
{
return h;
}
h = ::GetNextWindow( h , GW_HWNDNEXT);
}
return NULL;
}
|
|
|
|
|
I hope u checked the error code. Величие не Бога может быть недооценена.
|
|
|
|
|
Actually this function returning some handle that is not related to desired window in vista.
I came to know when I pass windows HWND to message box to make it model.
In XP message box is model, but in vista it is modeless So I think HWND is not correct in vista?
|
|
|
|
|
You could try to place and test the code
inside a service, that would be started by user SYSTEM...
(if you know the title or class (discovered by Spy) of your dialog,
you could try the function FindWindow(..) too )Check your definition of Irrationality[ ^]
1 - Avicenna
5 - Hubbard
3 - Own definition
|
|
|
|
|
I want to place the window at top,left corner..
any idea
|
|
|
|
|
Your idea is fully correct:
you need the windows handle
(
Did you try your previous posted context (5 min waiting) with
while (!FindWindow(..) &&
!WaitTimeLimit()) {
Sleep(100);
} )Check your definition of Irrationality[ ^]
1 - Avicenna
5 - Hubbard
3 - Own definition
|
|
|
|
|
Could you give answer according to my problem / code?
I print the title of window, in vista I am getting different window title.
It means there are same process id for 2 process.
How to get correct one?
|
|
|
|
|
You could pass the returned handle to the searching tool of Spy
to control and analyze the result Check your definition of Irrationality[ ^]
1 - Avicenna
5 - Hubbard
3 - Own definition
|
|
|
|
|
I think you should load the visual c++ 2008 which suport new grammar to help you accomplish your program .
|
|
|
|
|
Hi,
I have a string like " Tag-10 CValve-15 Pump-2 ColorPush-1 Push-5"
Here i have to get the numbers of particular string.
I will find "Tag-" and then i will get the value 10.Like this i have to proceed.
What my problem is when i Find for "Push-",it returns the value as 1
and when i search for "ColorPush-",it return the value as 1.
But for "Push-" i want only the value of 5.How can i get that?
BOOL bFind = sTemp.Find("Tag") != -1 ? TRUE : FALSE;
if(bFind)
{
iPosHypen = sTemp.Find("Tag-");
iPosNewLine = sTemp.Find("\n", iPosHypen+4);
sName = sTemp.Left(iPosNewLine - 1);
sNo = sName.Mid(iPosHypen + 4);
iTagNum[iNo] = atoi(sNo);
}
.
.
bFind = sTemp.Find("Push") != -1 ? TRUE : FALSE;
if(bFind)
{
iPosHypen = sTemp.Find("Push-");
iPosNewLine = sTemp.Find("\n", iPosHypen+5);
sName = sTemp.Left(iPosNewLine - 1);
sNo = sName.Mid(iPosHypen + 5);
iButtonNum[iNo] = atoi(sNo);
}
bFind = sTemp.Find("ColorPush") != -1 ? TRUE : FALSE;
if(bFind)
{
iPosHypen = sTemp.Find("ColorPush-");
iPosNewLine = sTemp.Find("\n", iPosHypen+10);
sName = sTemp.Left(iPosNewLine - 1);
sNo = sName.Mid(iPosHypen + 10);
iPushNum[iNo] = atoi(sNo);
} Anu
|
|
|
|
|
Firstly let me ask you, did u check the syntax of CString::Find functions([^])?
It returns integer not bool, and it returns the index which can be used to find in case of multiple occurances.
Find is overloaded functions,
int Find( TCHAR ch ) const;
int Find( LPCTSTR lpszSub ) const;
int Find( TCHAR ch, int nStart ) const;
int Find( LPCTSTR pstr, int nStart ) const;
I think this sample code will solve your problem.
int nFind = sTemp.Find("ColorPush", 0);
if( -1 != nFind )
{
nFind++;
}
int nFind = sTemp.Find("Push", nFind ); Величие не Бога может быть недооценена.
|
|
|
|
|
always go for simple solutions. If a blank space is guaranteed before the items you search, then find them as
int nPos = sTemp.Find(" ColorPush-");
if(-1 != nPos)
{
}
nPos = sTemp.Find(" Push-");
if(-1 != nPos)
{
}
|
|
|
|
|
Actually before every text no blankspace occur.all are new line character.
"Tag-10||CValve-5||Push-1||ColorPush-5"
Is there any way to search full text.
Like, if im searching for "Push",it should get only "Push" not "ColorPush".Anu
|
|
|
|
|