Hi Jeff, There aren't any hazards to moving a SQLRPGLE to another box, and a SQLPACKAGE is best described as *Pgm rather than Data. ODBC connections create SQLPACKAGE to store plan inf. SQLRPGLE binds plan inf into itself rather than creating a SQLPACKAGE. I'm also curious to learn advantages of putting SQLRPGLE into a SQLPACKAGE.
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Embedded SQL & accessing a remote database
Collapse
X
-
Embedded SQL & accessing a remote database
Its my understanding that creating an SQLPACKAGE allows remote accesses, such as ODBC/JDBC to utilize the package for quicker optimization of an SQL command. I do not believe that it is of any benefit for an RPG program, but if anyone knows different, I would love to hear about it.
-
Embedded SQL & accessing a remote database
OK, the ignorant will now weigh in.... I THOUGHT that putting an RPG into a package will allow it to be called from a remote access just like it would any other stored procedure. But I've never done it, so I am really guessing. I'd be very interested because I'm thinking of a use for the SQL2XML (discussed elsewhere in this forum) that I'd think would be best served by a stored procedure. Am I right that an AS/400 sqlpkg is just their name for a stored procedure? -dan
Comment
-
Embedded SQL & accessing a remote database
Dan, Every RPG program can be called as a stored procedure, with or without SQL, with or without a package. You may want to register the RPG program as a stored procedure to clearly define certain attributes or parameters. But in general, a SQL CALL through ODBC can execute most high level language programs on the iSeries.
Comment
-
Embedded SQL & accessing a remote database
A SQL Package is something that gets created on a remote database using the embedded SQL statements in an RPG program. We use it because we have a program running on one partition that accesses data on another partition. By specifying the Remote Database and the name and library where you want the SQL package to be stored (on the remote machine) in the CRTSQLRPGI program the system knows that it should run the SQL statements on the remote machine instead of the local database. The SQL package cannot be used (as far as I know) by anything other than the program/module that was used to create it. You could also create a stored procedure on the remote machine and call it from the local machine, but that is a different (ane more universal) technology. You also have to pay attention to security between the two databases.
Comment
-
Embedded SQL & accessing a remote database
I am new to imbedded SQL and I have a few questions: 1)Are there any issues with copying an SQLRPGLE object from one box to another? 2)What if you are accessing a remote database, can the SQLPACKAGE created on the remote box be copied to another box? 3)Would it be recommended to put the SQLPACKAGE in a data library or in a program library? Thanks in advance!!
Comment
Comment