VB 2008中的程序 [英] program in vb 2008

查看:65
本文介绍了VB 2008中的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我在Visual Studio 2008中有一个问题.我正在制作一个可与数据库一起使用的程序(访问2007),但它不能完全正常工作.我的问题是,在保存任何内容之前,它必须每次都与数据库连接.如果我构建程序并运行它,则不会出现错误,但它不会在db中保存任何内容.我可以使我的程序始终与数据库连接吗???

请帮助我,我需要一个解决方案. :((:((:(((

Hello to all.
I have aproblem with visual studio 2008. I''m making a program that works with database (access 2007) and it does not work corectly. The problem I have is that it must to connect with database everytime before I save something. If I built the program and run it, no errors apper but it doesn''t save anything in db. Can I make my program to be connected with database always???

Please help me, I need a solution. :(( :(( :((

推荐答案

Emirian Jaku写道:
Emirian Jaku wrote:

我遇到的问题是,在保存任何内容之前,它必须每次都与数据库连接.

The problem I have is that it must to connect with database everytime before I save something.


为什么?
您不能只在程序开始时打开连接,而在程序结束时关闭它吗?

关于VB.NET和MS Access,有很多可用的教程,例如,参见[ ^ ].

:)


Why?
Can''t you just open a connection, say, at program start and close it at program end?

There are a lot of available tutorials about VB.NET and MS Access, see, for instance [^].

:)


您需要自己做一些研究.

开始于:

ADO.NET概述 [使用具有现有数据的数据集 [
you need to do some research on your own.

Start with:

Overview of ADO.NET[^]

Then try here:

Using a DataSet with Existing Data[^]

specifically look at the link titled: "Updating the Database with a DataAdapter and the DataSet"


这篇关于VB 2008中的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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