数据不要保存在DATA BASE中 [英] Data Do NOT Save In DATA BASE

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

问题描述

大家好,
我在windows vista上使用vs 2008,我在我的项目中添加了一个服务数据库。我使用(ADO.NET)SqlCommand将数据插入到一个表中,在程序中每件事都可以,但在关闭我的应用程序后,我的表中没有任何内容。
我使用linq(LINQ to SQL),我制作了新的数据对象(表格行)然后我调用了InserOnSubmit(...)方法,之后我调用了SubmitChange()方法来存储数据(实际上)数据库,但又没有添加项目?!!!!!
我该怎么办?
请帮帮我。

Hi there, I uses vs 2008 on windows vista, I add an service database into my project. I use (ADO.NET) SqlCommand to insert data into one table, in the program every thing is OK, but after closing my application, there is nothing in my table. I use linq(LINQ to SQL), I made new data object( row of table) then I call InserOnSubmit(...) method and after that I call SubmitChange() method, to store data (actually) in database, but again there is no added item?!!!!! what should i do? please help me.

推荐答案

你好,

你能指明,你是什么意思写"添加服务"数据库",您使用哪个数据库提供程序?
如何检查"我的表中没有任何内容"?在您调用SubmitChange后尝试从该表中选择数据。您是否获得了刚刚创建的行?是您是否从VS启动了应用程序?如果是,那么你可以尝试从探险家发布它。你有同样的结果吗?

谢谢,
亚历山大
Hi,

Could you please specify, what do you mean writing "add an service database", which data base provider do you use?
How do you check that "there is nothing in my table"?
After you've called SubmitChange try to select data from this table. Do you get the row you've just created?
Are you launching your application from VS? If yes then could you please  try to launch it just from explorer. Have you got the same result?

Thanks,
Alexander


这篇关于数据不要保存在DATA BASE中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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