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
Chevy Mark Sunderland
NA
188
166.7k
Cannot implicitly convert type 'System.Data.Odbc.OdbcConnection' to 'System.Data.SqlClient.SqlConnection'
Mar 9 2012 5:59 AM
Hi there, I hope your help.
I try this statement in asp net, but receive this alert, can you help me?
thanks in advance.
Server Error in '/' Application.
Compilation Error
Description:
An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message:
CS0029: Cannot implicitly convert type 'System.Data.Odbc.OdbcConnection' to 'System.Data.SqlClient.SqlConnection'
Source Error:
Line 42: conn.Open(); Line 43: cmd.CommandText = sSQL;
Line 44: cmd.Connection = conn;
Line 45: SqlDataReader dr; Line 46: dr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
Attachment:
codes.zip
Reply
Answers (
2
)
Display video in asp.net 4.0
Click avent on a menu link item to trigger a sql select sproc that will display results on a webform data grid