Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
With this line of code

using (rdr as mysqldatareader = cmd.executereader())
I get an error saying rdr is not declared. When I remove the brackets so that it becomes

Using rdr As MySqlDataReader = cmd.ExecuteReader()
I get error on this line tmpObj.No = rdr("No").ToString()saying No is not a member of the project.Form.Appdata and this line tmpObj.Template = templa8 and Template is not a member of the project.Form.AppData.

What I have tried:

using (rdr as mysqldatareader = cmd.executereader())
I get an error saying rdr is not declared. When I remove the brackets so that it becomes

Using rdr As MySqlDataReader = cmd.ExecuteReader()
I get error on this line tmpObj.No = rdr("No").ToString()saying No is not a member of the project.Form.Appdata and this line tmpObj.Template = templa8 and Template is not a member of the project.Form.AppData.
Posted
Updated 13-Oct-17 9:54am
v3

1 solution

You have been told what the problem is: L get this an error on this line using (rdr as mysqldatareader = cmd.executereader()) rdr[^]
Just dumping your code on us afterwards and basically saying "I don't know what I'm doing, you sort it out" isn't going to make you any friends here.

While I appreciate you have a task to do, it's what you are paid for, not us - so ignoring error messages that are explicit in saying what the problem is does not help your case.

And just throwing your entire code at us is plain rude.
 
Share this answer
 
Comments
Jim Adjei-Wiredu 13-Oct-17 15:08pm    
Hi, sorry if it offends anyone. I'm only looking for help. I'm new here.
OriginalGriff 13-Oct-17 15:53pm    
If you are looking for help, then don't ignore it when it is given: I explained what the error meant, and that we couldn't fix it for you.
So instead of thinking, and fixing it you just post the same again...

This is a business where thinking is not "a good idea" it's compulsory. Expecting others to do that for you is when it becomes rudeness. Capiche?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900