Reputation: 61
I am new to this. Help will be greatly appreciated. I am using ODBC connection to connect to progress db driver Progress.Open4GL.Proxy. I am able to run sql statements by passing my sql statement and the connection string to
OdbcDataAdapter
. I want to now call the .p procedures in C# code using OdbcDataAdapter. Can anyone tell me how to do it? Please let me know if you require any additional explanation or if I am not clear in my question.
Upvotes: 0
Views: 1365
Reputation: 14020
Calling a dot-p would generally be accomplished via the "appserver". Whether or not an app server has been made available to you for that purpose depends on the local configuration and who is supplying the dot-p code.
You do mention a proxy above so it might be that such a thing exists already. The interface is created with a tool called "proxygen". If it does exist then someone should have told you how to connect to it and what the API should look like. If it is a vendor supplied product there is probably documentation available from that vendor. If it was created in-house then the programming team should know.
The Progress OpenEdge database can support stored procedures but they are not usually used and they do not take the form of dot-p code. (They are Java.)
Progress can also publish SOAP services. If that is available someone should be able to provide the WSDL.
Recent releases also support REST services.
Upvotes: 2
Reputation: 697
I don't think you can. *.p files are native progress source files that can be run directly only via progress executable (or some other progress code) - with "-p" parameter together with procedure name.
If you're talking about stored procedures , those have to be stored in DB itself via SLQ Explorer beforehand and can be accessed via ODBC.
Take a look here, chapter 11.
This is without knowing your progress version. I vaguely remember db triggers were p files attached to db in progress 8 ... can't remember about stored procedures.
Upvotes: 0
Reputation: 54477
I'm not familiar with Progress as a database but it sounds like you want to execute a stored procedure. If so then you simply supply the procedure name instead of the SQL code and then set the CommandType of your command object to StoredProcedure. If you have created a data adapter using the constructor that takes two Strings, you can access the command via the SelectCommand property.
Upvotes: 0