|
|
Sponsor |
ODBC int2 parameters to pg function: msg#00043db.postgresql.odbc
I have discovered a problem with passing parameters to a pg function using the ODBC driver. I have delcared a pg function as: function GENERATE_TIMESHEETS(timestamp,timestamp,smallint,smallint) .... I have a .NET program that uses the following: cmd.CommandText = "SELECT GENERATE_TIMESHEETS(?,?,?,?)"; cmd.Parameters.Add("DATE_FROM",OdbcType.DateTime,8); cmd.Parameters.Add("DATE_TO",OdbcType.DateTime,8); cmd.Parameters.Add("TIME_FROM",OdbcType.SmallInt,2); cmd.Parameters.Add("TIME_TO",OdbcType.SmallInt,2); I then assign the parameter values and execute the statement. pg returns an error stating GENERATE_TIMESHEETS(timestamp,timestamp,int4,int4) cannot be found It appears that the ODBC driver is not typecasting the smallint (int2) parameters correctly for the function call. Can anyone shed any light on this? Thanks Gary. ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Access 2002 and psqlodbc 7.03.02, David P. Lurie |
|---|---|
| Next by Date: | Re: ODBC int2 parameters to pg function, Tom Lane |
| Previous by Thread: | Newbie odbc simple select maybe cache problem, Marcin Miedziejko |
| Next by Thread: | Re: ODBC int2 parameters to pg function, Tom Lane |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|