473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

'PostgreSQL OLE DB Provider' failed with no error - dbread=dbcomm.ExecuteReader()

I'm making a very simple webpage to view data in a Postgres tbale. Having not done this belore with ASP.NET I'm taking it slowly and overcoming most problems. However I cannot work out what is going on here: I get this message:

SERVER ERROR
'PostgreSQL OLE DB Provider' failed with no error message available, result code: -2147221163(0x80040155).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: 'PostgreSQL OLE DB Provider' failed with no error message available, result code: -2147221163(0x80040155).

Source Error:


Line 11: sql="SELECT table_name FROM nfmd_master"
Line 12: dbcomm=New OleDbCommand(sql,dbconn)
Line 13: dbread=dbcomm.ExecuteReader()Line 14: nfmd_master.DataSource=dbread
Line 15: nfmd_master.DataBind()


Source File: G:\wwwroot\internettest\cat.aspx Line: 13

Stack Trace:


[OleDbException (0x80040155): 'PostgreSQL OLE DB Provider' failed with no error message available, result code: -2147221163(0x80040155).]
Microsoft.VisualBasic.CompilerServices.Container.I nvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags) +202
Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) +275
ASP.cat_aspx.Page_Load() in G:\wwwroot\internettest\cat.aspx:13
System.Web.Util.CalliHelper.ArglessFunctionCaller( IntPtr fp, Object o) +8
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +8668019
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


MY CODE IS:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%@ Page Language="VB" Debug="true" %>
  3. <%@ Import Namespace="System.Data.OleDb" %>
  4. <script runat="server">
  5. sub Page_Load
  6. dim dbconn,sql,dbcomm,dbread,nfmd_master
  7.  
  8. dbconn=New OleDbConnection("Provider=PostgreSQL OLE DB Provider;Data Source=localhost;location=gis;User ID=postgres;password=password;")
  9. dbconn.Open()
  10.  
  11. sql="SELECT table_name FROM nfmd_master"
  12. dbcomm=New OleDbCommand(sql,dbconn)
  13. dbread=dbcomm.ExecuteReader()
  14. nfmd_master.DataSource=dbread
  15. nfmd_master.DataBind()
  16. dbread.Close()
  17. dbconn.Close()
  18.  
  19. end sub
  20.  
  21.  
  22. </script>
  23.  
  24.  
  25.  
  26. <html>
  27. <head>
  28. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  29. <title>PostGIS Data Catalogue</title>
  30.  
  31.  
  32. </head>
  33.  
  34. <body>
  35. <form runat="server">
  36. <asp:Repeater id="nfmd" runat="server">
  37.  
  38. <HeaderTemplate>
  39. <table border="1" width="100%">
  40. <tr>
  41. <th>table_name</th>
  42. </tr>
  43. </HeaderTemplate>
  44.  
  45. <ItemTemplate>
  46. <tr>
  47. <td><%#Container.DataItem("table_name")%></td>
  48.  
  49. </tr>
  50. </ItemTemplate>
  51.  
  52. <FooterTemplate>
  53. </table>
  54. </FooterTemplate>
  55.  
  56. </asp:Repeater>
  57. </form>
  58.  
  59.  
  60. </body>
  61. </html>
  62.  
  63.  
can anyone help?

Thanks
Andrew
Sep 2 '10 #1
0 1592

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bon | last post by:
Hello All I got "Tables are skipped or export failed" error when I used upsizing wizard on migrating MS Access 2000 to MS SQL Server 2000. I am changing my application backend database from MS...
0
by: QZ | last post by:
This one happens once in while and I would appreciates any help that I can get. We have a webservice that generate pdf invoice files. We use dataset as our Source. i.e. we use SetDataSource(data);...
3
by: shreedhar | last post by:
If I try to delete a record from my table which is giving following error Warning: PostgreSQL query failed: ERROR: pg_atoi: zero-length string in /xxx/database.inc on line 73 What might be...
3
by: ralphdepping | last post by:
Trying to get moinmoin wiki working on Windows 2000 using IIS and python. I get the following error when trying to view the start page after insalling moinmoin and python - key error seems to be...
0
by: t0nt0n | last post by:
i have an xp OS service pack 2 currently working on a project that uses ms access 2003 with mysql 5.0 backend... i get an odbc--call failed error when I manually changed the system date in my...
0
by: rhepsi | last post by:
Dear All, Im vb.net 1.1, When im trying to update the records from mysql to postgresql, the connection error: the following code is Update data button click: Dim myPgrConnect As...
0
by: jianxin9 | last post by:
Hi everyone, I don't have a lot of experience with ASP and I was hoping someone could help me. I want to use our ASP form along with some javascript code to create a form where our patrons can...
5
by: kchang | last post by:
I am trying to view my reports based on a linked table database. However both the reports and the queries they're based on give me a "odbc--call failed" error. When I click on help it cites error...
1
by: aurekha | last post by:
Hi All, Im newbie to Perl. My problem is that, when i run my script, It is showing the error like "DBI connect('blah','blah',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.