Welcome! Log In Create A New Profile

Advanced

Importing the Oracle Database in Run-Time

Posted by Mitchell 
Mitchell
Importing the Oracle Database in Run-Time
June 09, 2008 01:00PM
Dear Windev coders,
Hi all, I want to know how to import the Oracle database in Run-Time? How to import it with the parameters (like server name,username,password) for that database.

see picture for details :


I want to make this import in RUN-TIME of my application .


help please.

thank u

mitch
Mitchell
Re: Importing the Oracle Database in Run-Time
June 09, 2008 09:56PM
paging Mr. Fabrice Please? any idea about this thread? the main concern is :

1. How to import Oracle Database in Runtime.

I checked the following commands :
a. HdescribeConnection
a1. HopenConnection
b. HdeclareExternal
c. SQLConnect

None of those commands are working. the oracle tables must be imported by using the wizard, i did not see any helps regarding the Importing of Oracle Tables in RUntime.

Help please

regards
Mitch
Fabrice Harari
Re: Importing the Oracle Database in Run-Time
June 09, 2008 11:49PM
Hi Mitch...

there was a thread on that very subject January 6...
You can find the whole thread on the pcsoft us forum, but the gist of it is there, as sent by Ben:

1. Added a new connection from my analysis, and set up the connection string for OLE DB to SQL and called it "NewConn"
2. sqlres is boolean
sqlres = HDeclareExternal(gsCurrentObject, gsCurrentObject, NewConn)
IF sqlres THEN
BuildBrowsingTable(TABLE_Browse,gsCurrentObject, taFillTable)
END

What that tells us is that to import an oracle DB at runtime without declaring it inthe analysis, you need to declare an OLEDB (or direct access) connection to it in your code, then BY EXAMPLE (because there are other ways to do it such as direct sql queries) do a hdecalreexternal, then a builbrowsingtable...

From there it's just a question of massaging your data and writing it in your internal DB...
Yo can also just create a query per table and write the result in your external DB...

Now of course, if you plan on importing the data, it means that you know the external DB schema (in order to match it to your internal one)... So you should be able to import the oracle DB schema in your analysis, then declare the connexion to your oracle DB and read from it/write in your internal DB using whatever you prefer (sql queries, windev queries, hfilter/hreadxxx)

best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting
Mitchell
Re: Importing the Oracle Database in Run-Time
June 10, 2008 12:54PM
thanks a lot fabrice, i will study this buildbrowsingtable command and investigate further, by the way, do you have the link of the thread that Ben was posted? related to this thread?

thanks again

mitch
Mitchell, Oracle holds your table information (in fact all schema info) in another set of tables called "dba_objects" or "all_objects" or "user_objects". You can query these systemtables with a simple select statement.

Arie
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: