Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Question Unanswered: ERROR: cross-database references are not implemented

    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...


    Dim sel As String
    sel = "SELECT * FROM ""SCHEMA1"".""CUSTOMERS"" "

    Dim ds As New DataSet
    Dim da As New Odbc.OdbcDataAdapter(sel, sConnectionString)
    da.FillSchema(ds, SchemaType.Source, """SCHEMA1"".""CUSTOMERS""")

    Dim dr As DataRow = ds.Tables("""SCHEMA1"".""CUSTOMERS""").NewRow()

    dr("id_customer") = "00062"
    dr("n_doc") = "9999-99999999"
    dr("age") = "29"
    dr("gender") = "MALE"

    ds.Tables("""SCHEMA1"".""CUSTOMERS""").Rows.Add(dr )

    Dim CmdBuilder As New OdbcCommandBuilder(da)

    Try
    da.Update(ds, """SCHEMA1"".""CUSTOMERS""") 'IN THIS LINE I GET THE ERROR MESSAGE
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try


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



    If somebody puts a smile on my face i'll be really glad thank you!

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    You're trying to populate a never connected data set from the contents of a record from a connected dataset?

    Take a look at PostgreSQL's community mailing lists. ref http://archives.postgresql.org/pgsql...6/msg00010.php
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Jan 2009
    Posts
    3
    No. I'm just trying to INSERT a new row, that's all . Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •