TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
keith.bromwich
NA
34
0
invalidcastexception : iconvertiable
Feb 17 2004 11:56 PM
all okay using version 2 of the data access block i am trying to implement sqltransaction around severall calls to stored procedures i have set up the transactions as follows dim conn as new sqlconnection(connstring) conn.open dim transaction as sqltransaction transaction = conn.begintransaction sqlhelper.executenonquery(transaction, "a stored procedure name", sqlParameters) the sqlparameters have been defined above. if i pass the connection string instead of the transaction then all works. that is no good. i need to wrap a few stored procedures in to a transaction. when i run the line sqlhelper then this causes the error. the exact error message System.InvalidCastException: Object must implement IConvertible. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters) in C:\Development\DCRS\DataAccess\SQLHelper.vb:line 427 at SqlHelper.ExecuteNonQuery(SqlTransaction transaction, String spName, Object[] parameterValues) in C:\Development\DCRS\DataAccess\SQLHelper.vb:line 464 at DCRS.DataAccess.SpeciesDB.Save(SpeciesInfo SpeciesInfo) in C:\Development\DCRS\DataAccess\SpeciesDB.vb:line 227" it is falling over in the sqlhelper when it is to run the query. okay anyone any ideas, come accross this problem no how to fix etc cheers keith
Reply
Answers (
0
)
Adding CrystalReportViewer to a VB.NET Project
Problems on class writing?