FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Testing Oracle
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Testing Oracle
Posted: Mon Oct 18, 2010 09:09 PM

Dear friends:

I have installed Oracle Database 10g Express and I can connect successfully in localhost way,
then I want to create a Database or schema and tables using xHarbour with ADO.

Somebody wants to share a little example with me ?.

Many thanks

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: Testing Oracle
Posted: Mon Oct 18, 2010 09:33 PM
Armando...

Search in ORACLE help, the sql string to create a DATABASE.. then

Code (fw): Select all Collapse
//---------------------------------------------------------------------------------------------------
Function SqlDo(cSelect)
Local Retorno
Local oCmd
Local oErrorCmd

   oCmd:=TOleAuto():New("ADODB.Command")
   oCmd:CommandText     := cSelect
   oCmd:CommandType     := adCmdText
   oCmd:ActiveConnection:= oCn

       TRY
         oRsCmd:=oCmd:Execute()
         Retorno:=oRsCmd:Fields( 0 ):value
       CATCH oErrorCmd
             ShowError(oErrorCmd)
       END

      oRsCmd:=Nil

Return Nil

//---------------------------------------------------------------------------------------------------
Function ShowError(oError,cTitle)
Local cMensaje:=""
Local cArg,cArgs:=""

If ValType(oError:Args) =="A"
   For Each cArg in oError:Args
            cArgs+=cValToChar(cArg) + CRLF
   NEXT
Endif

      cMensaje:=  "Descripción  : " + oError:Description      + CRLF + ;
                  "SubSistema   : " + oError:SubSystem + CRLF + ;
                  "SubCodigo    : " + ALLTRIM(Str(oError:SubCode)) + CRLF + ;
                  "Operacion    : " + oError:Operation + CRLF + ;
                  "Argumentos   : " + cArgs

Return Nil


With this funtion you can send any sql sentence to the server, change it to fullfill your needs..

From Chile
Adolfo

OCN is your active Oracle Connection
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Testing Oracle
Posted: Mon Oct 18, 2010 09:51 PM

Adolfo:

Thanks for your replay, I have tryed the way you advise me with no success and reading some manuals and tutorials I have found new terms as TABLESPACE, DATAFILE, etc and these terms confuse me.

I will try exactly with your code, I will inform you

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Testing Oracle
Posted: Tue Oct 19, 2010 04:03 AM

SET SPANISH = .T. please

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Testing Oracle
Posted: Tue Oct 19, 2010 04:59 PM

Willi:

SET SPANISH (.T.)

En el foro de Español hay un hilo sobre el mismo tema. Te busco por messenger.

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Testing Oracle
Posted: Thu Oct 21, 2010 02:15 PM

Friends:

Come on you guys, nobody has a small sample ?, pls.

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Testing Oracle
Posted: Thu Oct 21, 2010 02:26 PM

Have you tried the normal SQL CREATE TABLE command?

http://www.1keydata.com/sql/sqlcreate.html

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Testing Oracle
Posted: Fri Oct 22, 2010 12:22 AM

James:

Thanks a lot for your reply but It seems that oracle is stricter and to create the table is not enough, is necessary to create the database, tablespace and the user before. :oops:

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Testing Oracle
Posted: Thu Sep 01, 2011 05:11 PM

Compañeros:

Soy DBA en Oracle 9i, 10g y MS-SQL.

Si les puesdo aportar en algo, dejnmen saber.

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Testing Oracle
Posted: Thu Sep 01, 2011 08:33 PM

Compuin:

Gracias por el ofrecimiento, abusando de tu bondad, algun correo o mesenger para cantactarte ?

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Testing Oracle
Posted: Thu Sep 01, 2011 08:38 PM

Armando,

Estamos para aportar. Mucho he aprendido de esta comunidad y ya es hora de poner un granito de arena en mi especialidad.

Mi email es compuin@gmail.com

Saludos,

FWH 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Continue the discussion