Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

create Oracle database using IS6 and ADO


1 reply to this topic

starsea2blackstone

starsea2blackstone
  • Members
  • 1 posts

Posted 23 January 2002 - 17:15

I am trying to create Oracle database using IS6 + ADO, just like sb. did in IS6 samples for SQL server. I successfully create tablespace etc. However when I tried to create a table, I got a problem (the following is the code I am using). It looks like whenever the column name in new table has "END" in it, the Oracle Driver will return "invalid character" and stop the installation. For example, you cannot use "ENDDTA" or "DDEND" as the column name in my "create table " SQL statement.

Anybody has any idea to solve this problem? thanks in advance.

OBJECT pADOObj, pADOCommObj;
STRING szADOObjID, szADOCommObjID;
STRING svLine, szConnString, szSQL[1024];
begin    
// Create ADO Connection Object to connect to the SQL server              
szADOObjID = "ADODB.Connection";
set pADOObj = CreateObject(szADOObjID);

// Create the SQL string to complete the connection
   szConnString = "driver={Oracle ODBC Driver};";
   szConnString = szConnString + "server=myoracleserver;";
   szConnString = szConnString + "uid=mydatabase;";
   szConnString = szConnString + "pwd=mypassword;";

// Open the ADO Connection
pADOObj.Open(szConnString);

// Create the ADO Command object to execute the script                          
szADOCommObjID = "ADODB.Command";
set pADOCommObj = CreateObject(szADOCommObjID);
pADOCommObj.ActiveConnection = pADOObj;
           szSQL = "CREATE TABLE test(END NUMBER(11, 0) );pADOCommObj.CommandText = szSQL;
           pADOCommObj.CommandType = 1;
           pADOCommObj.Execute();


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 January 2002 - 19:30

#Moderation Mode

Moved to IS6 forum

Moved here