Connecting Tech Pros Worldwide Forums | Help | Site Map

ERROR: cross-database references are not implemented

Newbie
 
Join Date: Mar 2009
Posts: 1
#1: Mar 17 '09
HI!... I'm working in Visual Basic 2005 with PostgreSql via the oficial ODBC driver. When i try to insert a new row I get this error message:

ERROR: cross-database references are not implemented Here is the code...


Expand|Select|Wrap|Line Numbers
  1. Dim sel As String
  2. sel = "SELECT * FROM ""SCHEMA1"".""CUSTOMERS"" "
  3.  
  4. Dim ds As New DataSet
  5. Dim da As New Odbc.OdbcDataAdapter(sel, sConnectionString)
  6. da.FillSchema(ds, SchemaType.Source, """SCHEMA1"".""CUSTOMERS""")
  7.  
  8. Dim dr As DataRow = ds.Tables("""SCHEMA1"".""CUSTOMERS""").NewRow()
  9.  
  10. dr("id_customer") = "00062"
  11. dr("n_doc") = "9999-99999999"
  12. dr("age") = "29"
  13. dr("gender") = "MALE"
  14.  
  15. ds.Tables("""SCHEMA1"".""CUSTOMERS""").Rows.Add(dr )
  16.  
  17. Dim CmdBuilder As New OdbcCommandBuilder(da)
  18.  
  19. Try
  20. da.Update(ds, """SCHEMA1"".""CUSTOMERS""") 'IN THIS LINE I GET THE ERROR MESSAGE
  21. Catch ex As Exception
  22. MsgBox(ex.Message)
  23. End Try

Why I get this error message and how can solve it?

Reply