这是我的问题,我有一个大问题,我对此一无所知,所以请帮助我 [英] this is my problem what i got a big problem i dont know about this so please help me

查看:73
本文介绍了这是我的问题,我有一个大问题,我对此一无所知,所以请帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译错误
说明:编译服务该请求所需的资源期间发生错误.请查看以下特定的错误详细信息,并适当地修改您的源代码.

编译器错误消息:CS0103:名称连接"在当前上下文中不存在

源错误:


第34行:Panel1.Visible = false;
第35行:Panel3.Visible = true;
第36行:connection = ConfigurationSettings.AppSettings ["con"].ToString();
第37行:SqlConnection con =新的SqlConnection(connection);
第38行:con.Open();

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: CS0103: The name ''connection'' does not exist in the current context

Source Error:


Line 34: Panel1.Visible = false;
Line 35: Panel3.Visible = true;
Line 36: connection = ConfigurationSettings.AppSettings["con"].ToString();
Line 37: SqlConnection con = new SqlConnection(connection);
Line 38: con.Open();

推荐答案

错误详细信息非常清楚地告诉您,在使用变量连接之前您尚未定义.
变量"connection"的定义在哪里!
The error detail is telling you this very clearly that you have not defined variable connection before using it.

Where is the definition of variable "connection" !!


声明连接...
字符串连接;
declare the connection...
string connection;


这篇关于这是我的问题,我有一个大问题,我对此一无所知,所以请帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆