Click here to Skip to main content
15,914,905 members
Home / Discussions / Database
   

Database

 
GeneralRe: Database design Pin
V.17-Dec-10 4:13
professionalV.17-Dec-10 4:13 
AnswerRe: Database design Pin
Luc Pattyn17-Dec-10 1:39
sitebuilderLuc Pattyn17-Dec-10 1:39 
GeneralRe: Database design Pin
V.17-Dec-10 4:16
professionalV.17-Dec-10 4:16 
GeneralRe: Database design Pin
Corporal Agarn17-Dec-10 9:26
professionalCorporal Agarn17-Dec-10 9:26 
GeneralRe: Database design Pin
Mycroft Holmes17-Dec-10 11:02
professionalMycroft Holmes17-Dec-10 11:02 
AnswerRe: Database design Pin
PIEBALDconsult17-Dec-10 17:51
mvePIEBALDconsult17-Dec-10 17:51 
AnswerRe: Database design Pin
David Mujica20-Dec-10 10:42
David Mujica20-Dec-10 10:42 
GeneralRe: Database design Pin
V.20-Dec-10 20:13
professionalV.20-Dec-10 20:13 
QuestionStoring images, documents etc in a database Pin
jgrogan15-Dec-10 23:48
jgrogan15-Dec-10 23:48 
AnswerRe: Storing images, documents etc in a database Pin
Mycroft Holmes16-Dec-10 0:10
professionalMycroft Holmes16-Dec-10 0:10 
AnswerRe: Storing images, documents etc in a database Pin
Hiren solanki16-Dec-10 0:41
Hiren solanki16-Dec-10 0:41 
AnswerRe: Storing images, documents etc in a database Pin
Not Active16-Dec-10 2:23
mentorNot Active16-Dec-10 2:23 
AnswerRe: Storing images, documents etc in a database Pin
RaviRanjanKr16-Dec-10 2:53
professionalRaviRanjanKr16-Dec-10 2:53 
GeneralRe: Storing images, documents etc in a database Pin
jgrogan16-Dec-10 4:38
jgrogan16-Dec-10 4:38 
GeneralRe: Storing images, documents etc in a database Pin
jschell16-Dec-10 8:47
jschell16-Dec-10 8:47 
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 

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.