M
morleyc
Hi, i have a table with a number of real fields. I believe these
correspond directly to single/float types in C#. I create an insert
query in the dataset designer of Visual Studio 2005, and whilst in the
query builder screen i tried to test the query by hitting Execute
Query button. However, after entering the parameters (Time and Power
are the field names), an exception box pops up saying:
INSERT INTO Detail(Time,Power) VALUES (@Time,@Power)
Error source: SQL Server Mobile Edition ADO.NET Data provider
Message: @Time: Unable to cast object of type
'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible'
If i ever make any custom queries other than the standard SELECT,
UPDATE, DELETE etc that is generated the designer always sticks in
SqlDecimal, and i have to go through each parameter in the query's
propery window and reset the parameters to single again.
Should i be able to run this query from the designer? I havent had a
chance to get everything working in code so i dont know if it will
work or not with the same problem. Thanks in advance,
Chris
correspond directly to single/float types in C#. I create an insert
query in the dataset designer of Visual Studio 2005, and whilst in the
query builder screen i tried to test the query by hitting Execute
Query button. However, after entering the parameters (Time and Power
are the field names), an exception box pops up saying:
INSERT INTO Detail(Time,Power) VALUES (@Time,@Power)
Error source: SQL Server Mobile Edition ADO.NET Data provider
Message: @Time: Unable to cast object of type
'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible'
If i ever make any custom queries other than the standard SELECT,
UPDATE, DELETE etc that is generated the designer always sticks in
SqlDecimal, and i have to go through each parameter in the query's
propery window and reset the parameters to single again.
Should i be able to run this query from the designer? I havent had a
chance to get everything working in code so i dont know if it will
work or not with the same problem. Thanks in advance,
Chris