Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyTds::Error: Bad numbytes parameter passed to dbstrcpy #537

Open
Nyazfoxsoft opened this issue Jul 18, 2023 · 2 comments
Open

TinyTds::Error: Bad numbytes parameter passed to dbstrcpy #537

Nyazfoxsoft opened this issue Jul 18, 2023 · 2 comments

Comments

@Nyazfoxsoft
Copy link

Nyazfoxsoft commented Jul 18, 2023

Hi,

I'm having an issue with using this gem. Hoping someone can point to the right direction. Many thanks

Environment

Operating System

Using MacOS M1 Venture
ProductName: macOS
ProductVersion: 13.2.1
BuildVersion: 22D68

TinyTDS Version and Information
Using Version: freetds v1.3.18

Compile-time settings (established with the "configure" script)
                            Version: freetds v1.3.18
             freetds.conf directory: /opt/homebrew/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: yes
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.3
                              iODBC: no
                           unixodbc: yes
              SSPI "trusted" logins: no
                           Kerberos: yes
                            OpenSSL: yes
                             GnuTLS: no
                               MARS: yes

FreeTDS Version
freetds 1.3.18_1

Description

I'm getting the following error when trying to access an item from database using rails console

1] pry(main)> StockItem.last

TinyTds::Error: Bad numbytes parameter passed to dbstrcpy

from /Users/nyaz/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/tiny_tds-2.1.5/lib/tiny_tds/client.rb:60:in `connect'
@andyundso
Copy link
Contributor

Hello @Nyazfoxsoft

can you provide any information about the server you are trying to connect? Specifically SQL server version and which authentication method you use.

@Nyazfoxsoft
Copy link
Author

Nyazfoxsoft commented Jul 20, 2023

Hi @andyundso

The server is running Linux 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

The SQL details

Microsoft SQL Server 2012 (SP4-GDR) (KB4532098) - 11.0.7493.4 (X64) 
	Dec 24 2019 19:33:24 
	Copyright (c) Microsoft Corporation
	Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

in my rails application I use host, username and password to connect and connected to same server using VPN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants