I am converting cubecart into mssql from mysql but I ran into this roadblock.
When the script tries to insert
Code: Select all
INSERT INTO patrick_CubeCart_order_sum (cart_order_id, customer_id, email, name, add_1, add_2, town, county, postcode, country, phone, mobile, currency, name_d, add_1_d, add_2_d, town_d, county_d, postcode_d, country_d, subtotal, total_ship, total_tax, prod_total, shipMethod, ip, time, customer_comments, gateway) VALUES ('080310-183821-1682', '3655', 'pip@topnordic.com', ' Patrick Ipsen', 'Hovedvejen 176', '2 th.', 'Glostrup', ' ', '87687', 'Denmark', '72428626', ' ', '', ' Patrick Ipsen', 'Hovedvejen 176', '2 th.', 'Glostrup', ' ', '87687', 'Denmark', '190.00', '', '0.00', '190.00', 'Free Shipping', '75.130.110.48', '1205173291', '', 'Print_Order_Form')
Warning: mssql_query(): message: Error converting data type varchar to numeric. (severity 16) in D:\websites\convert\classes\db.inc.php on line 204
My database schema is the following:
Code: Select all
-- Creating Table ""dbo.patrick_cubecart_order_sum""
CREATE TABLE dbo.patrick_cubecart_order_sum (
cart_order_id varchar(30) NOT NULL DEFAULT (''),
customer_id int NOT NULL DEFAULT ('0'),
[name] varchar(225) NOT NULL DEFAULT (''),
add_1 varchar(225) NOT NULL DEFAULT (''),
add_2 varchar(225) NOT NULL DEFAULT (''),
town varchar(225) NOT NULL DEFAULT (''),
county varchar(225) NOT NULL DEFAULT (''),
postcode varchar(225) NOT NULL DEFAULT (''),
country varchar(225) NOT NULL DEFAULT (''),
name_d varchar(225) NOT NULL DEFAULT (''),
add_1_d varchar(225) NOT NULL DEFAULT (''),
add_2_d varchar(225) NOT NULL DEFAULT (''),
town_d varchar(225) NOT NULL DEFAULT (''),
county_d varchar(225) NOT NULL DEFAULT (''),
postcode_d varchar(225) NOT NULL DEFAULT (''),
country_d varchar(225) NOT NULL DEFAULT (''),
phone varchar(225) NOT NULL DEFAULT (''),
mobile varchar(255),
subtotal decimal(30,2) NOT NULL DEFAULT ('0'),
prod_total decimal(30,2) NOT NULL DEFAULT ('0'),
total_tax decimal(30,2) NOT NULL DEFAULT ('0'),
total_ship decimal(30,2) NOT NULL DEFAULT ('0'),
status int NOT NULL DEFAULT ('1'),
sec_order_id varchar(30),
ip varchar(20) NOT NULL DEFAULT (''),
time int NOT NULL DEFAULT ('0'),
email varchar(225) NOT NULL DEFAULT (''),
comments text,
ship_date varchar(50),
shipMethod varchar(255),
gateway varchar(50) NOT NULL DEFAULT (''),
currency varchar(5) NOT NULL DEFAULT (''),
customer_comments text,
/* Keys */
PRIMARY KEY (cart_order_id)
)
GODoes anyone see the problem, Ive been staring at it for hours! lol