运行时出错 [英] Error during run time
问题描述
使用这行代码
使用(rdr为mysqldatareader = cmd.executereader())
我收到错误说rdr没有宣布。当我删除括号使它变成
使用rdr作为MySqlDataReader = cmd.ExecuteReader()
我在这一行得到错误tmpObj .No = rdr(No)。ToString()说No不是project.Form.Appdata的成员,这行tmpObj.Template = templa8和Template不是project.Form.AppData的成员。 />
我尝试过:
使用(rdr为mysqldatareader = cmd。 executereader())
我收到错误,说没有声明rdr。当我删除括号使它变成
使用rdr作为MySqlDataReader = cmd.ExecuteReader()
我在这一行得到错误tmpObj .No = rdr(No)。ToString()说No不是project.Form.Appdata的成员,这行tmpObj.Template = templa8和Template不是project.Form.AppData的成员。
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.
推荐答案
您被告知问题所在: L使用(rdr as mysqldatareader = cmd.executereader())rdr [ ^ ]
之后只是将你的代码转储给我们,并且基本上说我不知道我在做什么,你把它解决并不会让你在这里成为任何朋友。
虽然我很感激你要做的任务,这是你付出的代价,而不是我们 - 所以忽略明确说出问题所在的错误信息对你的案子没有帮助。
只是把你的整个代码丢给我们是非常粗鲁的。
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.
这篇关于运行时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!