If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to do Version Control in Stored Procedure?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-04, 23:53
chintatlim chintatlim is offline
Registered User
 
Join Date: Dec 2003
Location: MALAYSIA, KUALA LUMPUR
Posts: 4
Question How to do Version Control in Stored Procedure?

If my application program got two version or more (Database locate in same MYSQL server), but use difference stored procedure to control update or insert statement. How to do it?

Example:
Version 1:
Fields: ID, User, Name, Name2, DateOfBirth, Address.
Stored Procedure:
Create Procedure AddUser(ID Char(10), User Varchar(20),
Name Varchar(100), Name2 Varchar(100),
DateOfBirth DateTime, Address Text)
Begin
<Insert statement...>
...
<Update statement...>
END|

Version 2:
Fields: ID, User, Name, Name2, DateOfBirth, Address, Income,
Notes, etc...
Stored Procedure:
Create Procedure AddUser(ID Char(10), User Varchar(20),
Name Varchar(100), Name2 Varchar(100),
DateOfBirth DateTime, Address Text, Income Double,
Notes MediumText, ...)
Begin
<Insert statement...>
...
<Update statement...>
END|

How to create stored procedure support multi version??

If I use AddUser1 and AddUser2 and AddUser... for difference version, this will be create more procedure and more space and not easy to control and handle.

So, Any comment for this situation?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On