与数据库有关的问题 [英] Problem related with database

查看:78
本文介绍了与数据库有关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Visual Studio 2008中构建项目时,数据库是在
中创建的 bin->调试文件夹.因此原始数据库不是按项目获取的.所以我删除了在调试文件夹中创建的该数据库,但是仍然出现相同的问题.

因此数据不会保存在原始数据库中.

请帮助我.

When I build a project in visual studio 2008 the database is created in
bin-->debug folder. so original database is not fetch by project. So i delete that database which is created in debug folder but still same problem is occurs.

so data not saved in original database.

please help me.

推荐答案

您需要的东西叫做"connection string".这告诉您的应用程序可以在哪里找到数据库以及如何连接到数据库.通常,连接字符串可以在app.config文件中找到.
The thing you need is called "connection string". That tells your application where your database can be found and how to connect to it. Often, the connection string can be found in the app.config file.


您好,

尝试创建绑定控件(可能是绑定数据gridview控件),在该控件中建立到所需数据库的绑定连接.在执行此过程的过程中,您会发现其中一个步骤是获取Visual Studio生成的连接字符串.检查此连接是否与使用的连接字符串匹配.如果不匹配,请使用Visual Studio生成的连接字符串.这样可以解决问题.如果不能解决您的问题,请给我们提供有关您问题的更多详细信息(包括数据库的详细信息).

Ritwesh.
Hello,

Try creating a bound control(may be a bound data gridview control) where you are to establish a bound connection to your required database. In the process of doing so you will find in one of the steps you are getting a Visual Studio generated Connection String. Check if this connection matches with the Connection String used. If it does not match use the Visual Studio generated Connection String. This may solve the problem. If doesn''t solve your problem kindly give us more details of your problem(including the details of your database).

Ritwesh.


这篇关于与数据库有关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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