Click here to Skip to main content
15,892,809 members
Home / Discussions / Database
   

Database

 
GeneralRe: Storing images, documents etc in a database Pin
Mycroft Holmes16-Dec-10 12:07
professionalMycroft Holmes16-Dec-10 12:07 
GeneralRe: Storing images, documents etc in a database Pin
jgrogan16-Dec-10 23:22
jgrogan16-Dec-10 23:22 
GeneralRe: Storing images, documents etc in a database Pin
Mycroft Holmes17-Dec-10 11:07
professionalMycroft Holmes17-Dec-10 11:07 
GeneralRe: Storing images, documents etc in a database Pin
Ray Cassick19-Dec-10 4:29
Ray Cassick19-Dec-10 4:29 
GeneralRe: Storing images, documents etc in a database Pin
jschell19-Dec-10 10:08
jschell19-Dec-10 10:08 
AnswerRe: Storing images, documents etc in a database Pin
Henry Minute17-Dec-10 13:51
Henry Minute17-Dec-10 13:51 
QuestionSSIS package converting varchar(MAX) to nvarchar(50) Pin
raghvendrapanda15-Dec-10 22:36
raghvendrapanda15-Dec-10 22:36 
Question\r\n ignored when executing queryies using ADO Pin
Fayu14-Dec-10 13:01
Fayu14-Dec-10 13:01 
Hi,

I am having an issue executing a create procedure query to Oracle 10g. I am building the query in C++ (Exhibit A) and executing it using ADO (Exhibit B). In most systems, which I do not manage, the query is build and executed on oracle correctly (see Exhibit D). However, I have this one Oracle server that is, for some odd reason, ignoring the new line feeds (\r\n) (see Exhibit C).

Is there a setting in Oracle that I am over looking?

Your help is appreciated. Thanks in advance. Let me know if you need any more info.

EXHIBIT A - Code in C++ to build query:
CString cstrTmp;cstrTmp = 
"CREATE OR REPLACE PROCEDURE \"DoSomething\" \r\n" 
"(\r\n" " pTxt nvarchar2\r\n" ")\r\n" 
"as\r\n" 
"\r\n" 
"vXml XmlType;\r\n" 
"vTempCounter int;\r\n" 
"\r\n" "begin\r\n" 
"     --my comment\r\n"
"     dbms_output.put_line('test'); 
"end;\r\n"


EXHIBIT B - This is the code that executes the query above to the database (in c++):
//where cBuffer is the query above
if(pCommand == NULL) 
{ 
     pCommand.CreateInstance(__uuidof(Command)); 
     pCommand->CommandType = adCmdText; 
} 
pCommand->CommandText= _bstr_t(*cBuffer); 
pCommand->CommandTimeout = m_pConn->CommandTimeout; 
pCommand->ActiveConnection = m_pConn; 
pCommand->Execute(NULL, NULL, adExecuteNoRecords); 
pCommand = NULL;


EXHIBIT C - This is how the query is seen in the procedure - In one single line. \r\n is ignored:
CREATE OR REPLACE PROCEDURE "DoSomething"(pTxt nvarchar2)asvXml XmlType;vTempCounter int;BEGIN     --myComment     dbms_utput.put_line('test');END;


EXHIBIT D - It should show up like this after it is created on the database:
CREATE OR REPLACE PROCEDURE "DoSomething"
(pTxt nvarchar2)
asv
Xml XmlType;
vTempCounter int;
BEGIN 
     -- my comment
     dbms_output.put_line('test');
END;

QuestionRe: \r\n ignored when executing queryies using ADO Pin
Chris Meech15-Dec-10 3:04
Chris Meech15-Dec-10 3:04 
AnswerRe: \r\n ignored when executing queryies using ADO Pin
Fayu17-Dec-10 5:23
Fayu17-Dec-10 5:23 
GeneralRe: \r\n ignored when executing queryies using ADO Pin
Chris Meech17-Dec-10 9:39
Chris Meech17-Dec-10 9:39 
GeneralRe: \r\n ignored when executing queryies using ADO Pin
Fayu17-Dec-10 15:26
Fayu17-Dec-10 15:26 
QuestionReplace with integer (1,2,3...) Problem in SQL Query [modified] Pin
Varun Sareen14-Dec-10 0:40
Varun Sareen14-Dec-10 0:40 
AnswerRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki14-Dec-10 0:57
Hiren solanki14-Dec-10 0:57 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Corporal Agarn14-Dec-10 3:26
professionalCorporal Agarn14-Dec-10 3:26 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Jörgen Andersson14-Dec-10 10:04
professionalJörgen Andersson14-Dec-10 10:04 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Varun Sareen16-Dec-10 0:32
Varun Sareen16-Dec-10 0:32 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki16-Dec-10 1:54
Hiren solanki16-Dec-10 1:54 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Varun Sareen17-Dec-10 0:56
Varun Sareen17-Dec-10 0:56 
AnswerRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Hiren solanki17-Dec-10 1:16
Hiren solanki17-Dec-10 1:16 
GeneralRe: Replace with integer (1,2,3...) Problem in SQL Query Pin
Corporal Agarn17-Dec-10 3:38
professionalCorporal Agarn17-Dec-10 3:38 
QuestionPMT function IN ORACLE OR SQL Pin
ShaktisinhRathod13-Dec-10 23:05
ShaktisinhRathod13-Dec-10 23:05 
AnswerRe: PMT function IN ORACLE OR SQL Pin
Hiren solanki13-Dec-10 23:23
Hiren solanki13-Dec-10 23:23 
QuestionThe permissions granted to user 'domain\user' are insufficient for performing this operation. (rsAccessDenied) Pin
vinu.111112-Dec-10 23:44
vinu.111112-Dec-10 23:44 
QuestionMerge Replication Conflict Pin
Abdul Rahman Hamidy12-Dec-10 22:12
Abdul Rahman Hamidy12-Dec-10 22:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.