Move From MSSQL Server to PostgreSQL

  1. 7 months ago

    Alexis C

    21 Dec 2018 Pre-Release Testers, Xojo Pro Puerto Rico, USA

    This is my code

    Dim Rs As RecordSet
    DIm ps as ODBCPreparedStatement
    Dim sql As String
    sql = "SELECT NumSocio FROM dbo.Socios WHERE flag is null and NumSocio = ?"
    ps = me.Prepare(sql)
    ps.BindType(0, ODBCPreparedStatement.ODBC_TYPE_STRING)
    ps.Bind(0, NumSocio)
    Rs = ps.SQLSelect
    if me.Error then
    MsgBox me.ErrorMessage
    return false
    end if
    if Rs.EOF = false then
    Rs.Close
    return true
    else
    Rs.Close
    return false
    end if

    the problem is ODBCPreparedStatement no compatible with PostgreSQLPreparedStatement.

    so how i convert it

    thanks

  2. Bob K

    21 Dec 2018 Pre-Release Testers, Xojo Pro Kansas City

    You'll have to switch over to PostgreSQLPreparedStatement.

    Documentation:

  3. Louis D

    21 Dec 2018 Pre-Release Testers, Xojo Pro Montreal, QC, Canada

    I tried to do it myself like you and it was a lot of work. I eventually decided to use a conversion tool from Intelligent Converters It converted pretty much everything correctly and I had very little manual work to do. Not very expensive either. I have several different databases to convert over time and the tool works with all of them.

  4. Alexis C

    28 Dec 2018 Pre-Release Testers, Xojo Pro Puerto Rico, USA

    if any way to connect to postgresql by ODBCDatabase using DSN on windows 10

  5. Maximilian T

    29 Dec 2018 Pre-Release Testers, Xojo Pro Europe, Germany, Berlin

    Yes, see https://www.connectionstrings.com/postgresql-odbc-driver-psqlodbc/ . Not that I would have tried... But why would you want to do that? What's wrong with using the built-in postgresqldatabase (via plugin) or Christian Schmitz' MBS plugins?

  6. Alexis C

    29 Dec 2018 Pre-Release Testers, Xojo Pro Puerto Rico, USA

    ok
    thanks

or Sign Up to reply!