C#.net数据库应用程序 [英] C#.net database application

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

问题描述

大家好..


我是c#的新手,我需要在c#.net项目中连接一个小表,所以我不想使用SQL数据库.

任何人都可以给我一个简单的应用程序,该应用程序将Microsoft Access数据库与c#.net一起使用.

这样我就可以从一个小表中存储和检索数据.

请在这方面帮助我...

问候

Sunit parmar

Hi all..


I am new to c#.I need to connect a small table in my c#.net project so i don''t want to use SQL database.

Can any one give me a simple application which uses microsoft Access database with c#.net.

So i can store and retreive data from a small table.

please help me in this regard...

Regards

Sunit parmar

推荐答案

codeproject上有两篇文章向您展示了如何从Microsoft .Net应用程序连接到DB2数据库.
从.NET与DB2的连接 [ ^ ]
从Microsoft .NET连接到DB2 [
There are two articles here on codeproject that show you how to connect to an DB2 database from an Microsoft .Net application.

Connection to DB2 from .NET[^]
Connect to DB2 from Microsoft .NET[^]

Hope this helps.


SQLite

无服务器,兼容SQL-92,占用空间小,嵌入到包括Firefox在内的主流应用程序的负载中,可从C#轻松使用.

只需在此站点上搜索文章即可-这是一个:

[ ^ ]
SQLite

Serverless, SQL-92 compliant, tiny footprint, embedded in loads of mainstream apps including Firefox, and easily used from C#.

Just search for articles on this site for it - here''s one:
[^]


SqlConnection cs1 = new SqlConnection("Data Source=sedc;Initial Catalog=ur databasename;Persist Security Info=True;User ID=ur databaseusername;Password=ur databasepassword");
                        SqlCommand cmd1 = new SqlCommand();
                        cs1.Open();
                        cmd1.CommandText = "sql query";
                        cmd1.Connection = cs1;
                        int a = cmd1.ExecuteNonQuery();
                        cs1.Close();



例如:查询:select * from usermaster
usermaster是数据库中提供的表.

快乐编码



eg: query: select * from usermaster
usermaster is a table in your database provided .

happy coding


这篇关于C#.net数据库应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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