473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Objects must implement IConvertible

Gav
Hi All,

I'm trying to create a table in a sql database.

When I run
ExecuteNonQuery();

I get an error "Objects must implement IConvertible".

I put the same statement in a textbox, after getting the error I copied the
statement into SQL's query analyser and the command works fine.

Anyone know where I might be going wrong?

Thanks
Gav

Feb 14 '06 #1
2 1348
Hello, Gav!

Can you specify more details about that query, and if it is possible post the code, where you're
building sql query.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 14 '06 #2
Gav
I'm sorry it really was a silly mistake of my part I just didn't spot it.

I was creating parameters in the command too early. (there are parameters
for the insert which comes next, and I was setting the parameters before I
called the CREATE TABLE command!! - really must take more care in my coding
before scratching my head)

Thanks anyway
Gav

"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Hello, Gav!

Can you specify more details about that query, and if it is possible post
the code, where you're
building sql query.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Feb 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bill Cart | last post by:
This is a question from a confused newbe.I have an oldDbCommand component called oleDbCmdAddDemoReq and an oldDbConnection called oleDbConDemoReq on a web form. I have the following code: ...
5
by: Leon Shaw | last post by:
I'm trying to insert a record into a sql server 2000 database using a store procedure (vs.net is my develop tool) on the button click event but I keep getting the following error after clicking the...
7
by: Brian Henry | last post by:
Hi, I am doing the following stored procedure CREATE PROCEDURE . @sender varchar(50), @subject varchar(400), @messagebody text, @hasAttachments bit, @sentTime DateTime AS
1
by: Tim::.. | last post by:
Hi can someone please help me with the following error! I keep getting: ERROR: System.InvalidCastException: Object must implement IConvertible. Line 231: PageID =...
4
by: charleswesley | last post by:
I think the problem is with the strPrice variable in the AddToCart() sub. I've been messing with it all morning and can't seem to figure it out. Any ideas? ...
1
by: dan | last post by:
I am using VB.NET 2003 and SQL Server 2000. My program inserts new rows in a SQL table based on data read from a file. I generated the commands and the stored procedures with the DataAdapter...
3
by: dan | last post by:
I am using VB.NET 2003 and SQL Server 2000. My program inserts new rows in a SQL table based on data read from a file. I generated the commands and the stored procedures with the DataAdapter...
2
by: lcorrias | last post by:
i try to do a simple insert using SQLDataSource and a Stored Procedure I try all night and always have this error Object Must Implement IConvertible
0
by: dan | last post by:
Hi, I've been using a GridView for some time but this is the first time I need to delete a row in the grid whose primary key consists of 2 fields (table columns). I have a table with primary...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.