These are chat archives for rails-sqlserver/activerecord-sqlserver-adapter

2nd
Dec 2015
Saurabh Kadam
@saurkadam
Dec 02 2015 11:10
insert into organisation(id, Name, website, organisation_type, social_handlers, Date_of_establishment, STAT, City, Country, REPORT_TO, PRODUCT, extension, Telephone, PO_BOX_FIELD, ADDRES, EMAIL) valueS(1, 'Aeradio Technical Services', 'www.aeradio.com', 'Marine safety and security', 1, '2015-12-02', 'open', 'Manama', 'Bahrain', 'abc', 1, 123, 97317706400, 'PO Box 26803', 'Building No.1605, Road No. 5141, West Eker 951, Askar', 'aeradio@batelco.com.bh'); select * from organisation;
Arithmetic overflow error converting expression to data type int
i am new to sql
please can some tell me how am i suppose to solve this prob
insert into organisation(id, Name, website, organisation_type, social_handlers, Date_of_establishment, STAT, City, Country, REPORT_TO, PRODUCT, extension, Telephone, PO_BOX_FIELD, ADDRES, EMAIL)
valueS(1, 'Aeradio Technical Services', 'www.aeradio.com', 'Marine safety and security', 1, '2015-12-02', 'open', 'Manama', 'Bahrain', 'abc', 1, 123, 97317706400, 'PO Box 26803', 'Building No.1605, Road No. 5141, West Eker 951, Askar', 'aeradio@batelco.com.bh');
select * from organisation;
Saurabh Kadam
@saurkadam
Dec 02 2015 11:16
alt;
image.png
Arithmetic overflow error converting expression to data type int
i am gettin dis error
please can some1 help
Klaus
@KDGundermann
Dec 02 2015 15:50
You are trying to store the number 97317706400 in an integer field. The Value is to large for an integer field.
Btw. the column name is "Telephone". Don't use an integer field for a phone number (would you ever add two phone numbers? )
Vin Yu
@vin-yu
Dec 02 2015 19:46
I am able to connect and query my Azure SQL DB with tiny_tds but when using the activerecord-sqlserver-adapter it fails. I am getting the a " Write to the server failed." error: TinyTds::Error (Write to the server failed):
tiny_tds-0.7.0-x64 (mingw32) lib/tiny_tds/client.rb:74:in connect' tiny_tds-0.7.0-x64 (mingw32) lib/tiny_tds/client.rb:74:ininitialize'
activerecord-sqlserver-adapter (4.2.6) lib/active_record/connection_adapters/sqlserver_adapter.rb:280:in new' activerecord-sqlserver-adapter (4.2.6) lib/active_record/connection_adapters/sqlserver_adapter.rb:280:indblib_connect'
i am on windows 10, ruby 2.2.3, rails 4.2.5, tiny_tds 0.7 x64-mingw32
am i missing something?