Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (Oracle)
 We need somone to write triggers...
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 06 October 2000 :  15:44:28  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Ok... I have talked with a friend of mine who knows a bit about Oracle... and it seems that all we need to do is write a setup scrip for Oracle, and have it setup triggers for the DB.

Do we have anyone who is comfortable enouph with Oracle that can do this for us?

I believe we will not have to do any modifications to the code if we do this right! In the meantime, I will try to find my notes on this (I had written some triggers about a year ago for this forum) and see if I can come up with something.

Cheers!

Reinsnitz (Mike)
><)))'>

"Love one another. As I have loved you, so you must love one another. All men will know that you are my disciples if you love one another."
--John 13:34-35
<

h20
Starting Member

39 Posts

Posted - 12 October 2000 :  17:06:39  Show Profile
Hello Mike, we are currently using Oracle 8i within our intranet here at the Credit Union where I work. I think I may be able to help out with the triggers you need. What do you want the triggers to do? To set up the initial database? To create stored procedures? Or both? Let me know...

Seems as though you would have to include an ASP program that creates the database using pass-through SQL. That is unless you forced the users of your forum to push the tables into Oracle manually using ODBC. The only problem there is the ODBC driver turns all fields into a vchar format.

I have experience and lots of GOOD books using Oracle and ASP together. Let me know in deatil (by email if need be) what your ideas are.



<
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 29 October 2000 :  15:08:00  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
h2o, basicaly the Triggers would be the same as mentioned in the VFP forum... where we need to have the ID fields auto incrament on data entry :)

otherwise, I believe the forum itself will operate in an oracle environment (that is actualy the main reason for us making the date/time format switch to a String instead of Date/Time, becaus some DB's like Oracle do not accept the standard formats willingly or without workarrounds.

Reinsnitz (Mike)
><)))'>

"I no longer call you servants, because a servant does not know his master's business. Instead I have called you friends..."
-- John 15:15
<
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 29 October 2000 :  15:11:08  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
as far as initial setup... we would need to write into the setup.asp file the proper SQL statements for building the DB as you described... basicaly, once you have built a proper functioning DB in Oracle, do a Dump of the script (I think it's a feature of Oracle to give you a text output to build the tables again with)

we can use that script to incorporate the proper SQL sequencing / statements into the primary code.

Reinsnitz (Mike)
><)))'>

"I no longer call you servants, because a servant does not know his master's business. Instead I have called you friends..."
-- John 15:15
<
Go to Top of Page

h20
Starting Member

39 Posts

Posted - 06 November 2000 :  12:36:03  Show Profile
Ok Mike... I will duplicate the Access version of the DB in an Oracle 8i schema. Once I do that I will dump the SQL statements for reuse. I will also build the trigger for the autonumber feature. My department has a major Internet banking project due the day after tomorrow. I will get started on this next week. You can bet you will have a lot of assistance from me beeing that the Snitz/Oracle forum is one of the major projects for our Intranet redesign.


<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 07 March 2001 :  17:28:49  Show Profile  Visit gor's Homepage
Triggers are no longer the problem, this is how that should be done, i.e. for the FORUM_CATEGORY table:

strSql = "CREATE SEQUENCE " & strTablePrefix & "CATEGORY_SEQ INCREMENT BY 1;"

my_Conn_ODBC.Execute strSql
ChkDBInstall()

strSql = ""
strSql = strSql & " CREATE OR REPLACE TRIGGER " & strTablePrefix & "SET_CATEGORY_ID "
strSql = strSql & " BEFORE INSERT ON " & strTablePrefix & "CATEGORY "
strSql = strSql & " FOR EACH ROW "
strSql = strSql & " BEGIN "
strSql = strSql & " SELECT " & strTablePrefix & "CATEGORY_SEQ.NEXTVAL "
strSql = strSql & " INTO :new.CAT_ID "
strSql = strSql & " FROM DUAL; "
strSql = strSql & " END;"

my_Conn_ODBC.Execute strSql
ChkDBInstall()


Pierre<
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07