Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 sql insert with money type
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 08 March 2002 :  17:24:01  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
im trying to insert some text into a sql server where a couple field types are "money" Here is the sql string and then the error message...

INSERT INTO ExhibitParts_Store_Products (Prod_Cag_ID, Prod_Name, Prod_Description, Prod_Picture_URL, Prod_Usual_Price, Prod_Price, Prod_Quanity_In_Stock, Prod_Weight) VALUES ('4', 'Black Pro-style Cap', 'Constructed front cotton/polyester blended cap. Red embroidered Exxon logo. Adjustable self fabric back closure. Black. One size.', '100139_s.jpg', '3.95', '5.95', '25', '1')

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion from data type varchar to data type money, table 'exhibitpartscom.exhibitpartscom.ExhibitParts_Store_Products', column 'Prod_Usual_Price'. Use the CONVERT function to run this query.

/employee/edit_products.asp, line 117


I even tried inserting $3.95 and it still didnt work, what am i doing wrong?

INSERT INTO ExhibitParts_Store_Products (Prod_Cag_ID, Prod_Name, Prod_Description, Prod_Picture_URL, Prod_Usual_Price, Prod_Price, Prod_Quanity_In_Stock, Prod_Weight) VALUES ('4', 'Black Pro-style Cap ', 'Constructed front cotton/polyester blended cap. Red embroidered Exxon logo. Adjustable self fabric back closure. Black. One size.', '100139_s.jpg', '$3.95', '$5.95', '25', '1')


Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 08 March 2002 :  17:34:37  Show Profile  Visit HuwR's Homepage
you are trying to insert them as strings they are floating point numbers, they should not have any ' around them

Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 08 March 2002 :  17:38:32  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
oh, thanks huwr, ill try it without the '

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 08 March 2002 :  17:45:27  Show Profile
Did you try this?

quote:

INSERT INTO ExhibitParts_Store_Products (Prod_Cag_ID, Prod_Name, Prod_Description, Prod_Picture_URL, Prod_Usual_Price, Prod_Price, Prod_Quanity_In_Stock, Prod_Weight) VALUES ('4', 'Black Pro-style Cap', 'Constructed front cotton/polyester blended cap. Red embroidered Exxon logo. Adjustable self fabric back closure. Black. One size.', '100139_s.jpg', 3.95, 5.95, '25', '1')



Think PinkPost v40b03 Patches
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 08 March 2002 :  17:47:56  Show Profile
Hmm. That means, that I have to re-open the topic before posting!

Think PinkPost v40b03 Patches
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 08 March 2002 :  18:02:28  Show Profile  Visit HuwR's Homepage
quote:

Hmm. That means, that I have to re-open the topic before posting!

Think PinkPost v40b03 Patches



?

Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 08 March 2002 :  18:37:15  Show Profile
quote:

quote:

Hmm. That means, that I have to re-open the topic before posting!

Think PinkPost v40b03 Patches



?





My (bad) habbit is to open a couple of topic windows at once (from active.asp) and answer them one by one. I do this because I'm on 56K dial-up, and whichever topic comes first, I read that. Look, there are 10 good minutes between your post and mine, and I was not aware that you answered the question already.


Think PinkPost v40b03 Patches
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 08 March 2002 :  18:44:45  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
well it works, both of yall two get a jelly bean

thanks again

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 08 March 2002 :  19:01:07  Show Profile
Huw first

Think PinkPost v40b03 Patches
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07