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

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.

[code]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
[/code]

Anyone has advices?

Thanks!

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

I did that, also enabled 127.0.0.1 with port number…

Dynamic ports # is 49476

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

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

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.

OK, Thanks for the tip. I can see that, now my connection to Valentina doesn’t work anymore… :wink:

By the way, I’m curious to know why the PostgreSQL plugin doesn’t support the “Move First” function?

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

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!

Nothing time, money and expertise cant fix :stuck_out_tongue:

I’ll post a feature request just in case…

it already exists feedback://showreport?report_id=22656

Oups! What year? :slight_smile:

I’ll leave the one I just posted as a reminder…