Need help with query input parameters

how do i pass a parameter to sql server for exec query in table progress 4gl

Sample:

Code:
select  *

from pub.almo_historico_ressupr

where data = :datainicial

return error:

Missing input parameters.

Thank you.
 
Last edited:

TomBascom

Curmudgeon
I still don't get it.

One possibility: You can use the SQL-92 interface to get data from a Progress OpenEdge database. In order to do that someone (the DBA) must first configure the Progress database with appropriate parameters and GRANTs and so forth. You might use some 3rd party tool to access the data (you might even use a pass through query via SQL Server).

Another possibility: You have a Progress OpenEdge application and you need to access data that is in SQL Server database. You are attempting the use SQL statements from within the 4GL. This will not work. You _could_ access data in a non-Progress database by using a data server and writing 4gl queries.

In both cases there is significant setup and configuration required before any queries (such as you show above) will work and the follow-up questions necessary to help you actually resolve your problem depend greatly on what it is that you are trying to do.

In no case is there a simple and obvious answer to your current question.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Let's start simply:
  • Where is your data? In an OpenEdge database or a SQL Server database?
  • What is the client application in which you are entering SQL statements? A Progress editor? SQL Explorer (sqlexp)? Something else?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
So from this perspective, the OE database is just another ODBC data store. This seems more like a "how do I use SQL Server to do queries" question. Sorry, I can't help you there.
 

TomBascom

Curmudgeon
Does any other query of the data in your OpenEdge database work?

If at least one other OpenEdge query works then you at least have the basic connectivity configured and the issue is most likely, as Rob says, related to generic "how to use SQL Server" problems rather than OE.

If not then the problem could be literally anything and the first place to start is with whomever setup connectivity to OpenEdge. Someone has apparently created a "Data Source" called dsProgress so I would start there.
 

TomBascom

Curmudgeon
“Add a parameter” seems to be a function of the query tool that you are using. If :pDATAINICIAL is what you are referring to as a parameter then all I can say is that it is not valid Progress syntax. So it’s really a question for someone familiar with your SQL Server tool rather than a Progress question.
 

Stefan

Well-Known Member
Since dates are often special, do you have the same issue when adding a character or integer field as parameter?
 
Top