Mystified by MSSQL Server, Can't connect...

  1. 7 months ago

    Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    Hi,

    I try to connect to a local MS SQL Server but can't find out why my web app can't connect. I get the following error "Login time out expired" The timeout is set at 30 seconds.

    Server configuration and services configuration seems OK, Valentina Studio and Microsoft SQL Server Management Studio do connect without any issue.

    I used the usual code to connect with the exact same parameters I use to connect with Valentina Studio :

    I tried various combinations of hostname (without the server name, with "localhost"), ports, checked the firewall, activated ip addresses in SQL Server configuration manager... Nothing works.

    Dim db As New MSSQLServerDatabase
    db.Host = "ROGER-PARALLEL\SQLEXPRESS"
    db.Port = 53909
    db.UserName = "sa"
    db.Password = "ml6tech$&%"
    
    If db.Connect Then
      MsgBox( "Hourra!" )
    Else
      MsgBox( "Shit\" )
    End If 

    Anyone has advices?

    Thanks!

    It works with dynamic port number... How is that so?

  2. Bob K

    3 Jul 2019 Pre-Release Testers, Xojo Pro, Third Party Store Kansas City

    Make sure port is open for TCP connections. In SQL Server Configuration Manager in the SQL Server Network Configuration you'll find the TCP Port property. Scroll all the way to the bottom to the IPAll group and make sure it’s set to your port of choice (it was blank for me).

  3. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    I did that, also enabled 127.0.0.1 with port number....

  4. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    Dynamic ports # is 49476

  5. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro Answer

    It works with dynamic port number... How is that so?

  6. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    I mean why Xojo uses this port "Only" and not the others? Does that has something to do with the driver?

  7. Bob K

    3 Jul 2019 Pre-Release Testers, Xojo Pro, Third Party Store Kansas City

    I've found the MS SQL Server plugin to be pretty buggy. If you must use SQL Server I'd use the MBS SQL plugin.

  8. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    OK, Thanks for the tip. I can see that, now my connection to Valentina doesn't work anymore... ;)

  9. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    By the way, I'm curious to know why the PostgreSQL plugin doesn't support the "Move First" function?

  10. Norman P

    3 Jul 2019 Pre-Release Testers, Xojo Pro outside
    Edited 7 months ago

    WAG but maybe because at the time it was created PostgreSQL didnt support it in its cursors

    EDIT : or the plugin wasnt using postgesql cursors but was just using libpq pgresult sets which are forward only
    Postgresql cursors, which are not what libpq pgresults are, do support all kinds of jumps & move first etc

  11. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    Hum, would be a great idea to update it...

    Maybe I shouldn't bother but, to limit the interactions with the database, I sometimes keep a copy of the recordset for "short term future use". To do so, I transfer the content into an SQLite Recordset that I can use more than once.

    Thanks for the info!

  12. Norman P

    3 Jul 2019 Pre-Release Testers, Xojo Pro outside

    @Roger SArneault Hum, would be a great idea to update it...

    Nothing time, money and expertise cant fix :P

  13. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    I'll post a feature request just in case...

  14. Norman P

    3 Jul 2019 Pre-Release Testers, Xojo Pro outside
    Edited 7 months ago

    it already exists Feedback Case #22656

  15. Roger S

    3 Jul 2019 Pre-Release Testers, Xojo Pro

    Oups! What year? :)

    I'll leave the one I just posted as a reminder...

or Sign Up to reply!