php - Fedora 25 TSQL - Conversion failed when converting date and/or time from character string -
i have web server fedora server 25 (kernel 4.11.9-200) configured with:
httpd, php 7.0.22, mysql 5.x, freetds v1.00.47
and ms sql server 12.0.5203
web server work fine mysql, php, http pages. problem when try send request ms sql server. on sql server have 2 databases. on first database have table , can query via freetds - php (odbc_exec) - httpd fine!. on second database have stored procedure 3 input parameters (code, year, month).
i try call sp tsql (command line). can connect server when call sp have error:
msg 241 (severity 16, state 1) sqlserver-02, procedure elab_table line 50: "conversion failed when converting date and/or time character string."
my sql code is:
exec elab_table @code = 'abcd', @year = 2017, @month = 4
note: in sql server 2014 stored procedure work fine!
i obtain same error when try php (odbc or pdo function) of course....
this tsql -c output:
compile-time settings (established "configure" script) version: freetds v1.00.47 freetds.conf directory: /usr/local/etc ms db-lib source compatibility: no sybase binary compatibility: no thread safety: yes iconv library: yes tds version: auto iodbc: no unixodbc: yes sspi "trusted" logins: no kerberos: no openssl: no gnutls: no mars: no
freetds.conf
[global] tds version = auto
[tds]
host = 192.168.10.5
port = 1433
tds version = 7.4
odbc.ini
[sqlserver-02]
driver = sql-microsoft
description = stored_procedure
trace = no
server = 192.168.10.5
port = 1433
tds_version = 7.4
user=mydomain\sqluser
password=mypassword
odbcinst.ini
[sql-microsoft]
description=sql-microsoft
driver=/usr/local/lib/libtdsodbc.so
setup=/usr/lib64/libtdss.so.2
usagecount=1
fileusage=1
thanks lot!
Comments
Post a Comment