Skip to content

Example #21

Description

@bruceunx

As this crate mostly address the problem is mssql which remove from sqlx, but the readme and example all miss the mssql example or snippets, when most users here focused on mssql database, so it is better to make the point more clear.

Activity

  1. bruceunx commented on May 25, 2025

    @bruceunx
    Author

    And currently, I struggle to figure how to make the mssql works, as it always shows pool timed out while waiting for an open connection, while sqlcmd can connect it.

  2. lovasoa commented on May 25, 2025

    @lovasoa
    Collaborator

    Pull requests to the readme are welcome! Please make sure to write in good, simple english.

  3. bruceunx commented on May 26, 2025

    @bruceunx
    Author

    Thank you for the invitation, maybe later, currently for connect with url like mssql://user:password@ip:port/database try the following method

    // use option and parse str and then set encrypt to NotSupported
      let options = MssqlConnectOptions::from_str(database_url)?
          .encrypt(sqlx_oldapi::mssql::Encrypt::NotSupported)
          .trust_server_certificate(true);

    then it will work for local docker mssql container, others will show the error Error: Tls(Error { code: -9806, message: "connection closed via error" })

  4. bruceunx commented on May 26, 2025

    @bruceunx
    Author

    If you have better option, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions