如何为Windows窗体使用Access数据库 [英] how to use access database for windows forms

查看:235
本文介绍了如何为Windows窗体使用Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想使用Windows应用程序窗体中的访问数据库.请指导我如何开始,并且也没有用于访问数据库的存储过程,因此应该使用什么替代方法
谢谢
anoop

hi i want to use access database form my windows application form .please guide me how to begin and also there no stored procedures for access database so what should be its alternative
thanks
anoop

推荐答案

您可以使用oledb连接访问.我不知道如何访问存储过程,在很大程度上,我只是通过编码对象来管理它们的.

使用Access作为数据库时我发现了一些东西:

当您使用多用户应用程序时,它很快就会受到限制.

进行插入时,您需要保持连接打开,重新打开插入之间的连接非常耗时.

进行多个连接时需要括号

You can use oledb to connect to access. I don''t know a good way around stored procedures in access, I have just managed them via coding objects for the most part.

A few things I have found when using access as a database:

It gets limited pretty quick when you come to multi user applications.

When doing inserts you will need to leave the connection open, re-opening a connection between inserts is time consuming.

You''ll need paren''s when doing multiple joins

SELECT * FROM (((table1 inner join table2 on table1.f1 = table2.f1) 
inner join table3 on ... = ...) inner join table2 on ... = ... )




表/字段名称的保留字,空格等通常不是一个好主意,但是如果无法避免,请用[]
围起来
尝试使表管理查询尽可能地低(添加和删除字段等),因为如果不这样做,最终您将达到超出限制的水平.如果发生这种情况,您可以压缩和修复数据库,但是最好尝试并使其远离.

如果您可以构建数据库,然后在将其用于生产之前对其进行压缩和修复.




Reserved words, space, etc for table/field names is generally not a good idea, but if it can''t be avoided you surround them with []

Try to keep table management queries as low as possible (adding and dropping fields, etc) because eventually you will hit exceeded limits if you don''t. If this happens you can compact and repair the database, but it''s best to try and stay clear of it.

If you can build the database and then compact and repair it before it gets used for production.


您可以使用 [
You can use OLEDB [^]to perform operations on database using C#. You can refer this [^]to get started.

hope it helps :)


这篇关于如何为Windows窗体使用Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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