文件名称:CSharp-Access-to-sql-server-database
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.38mb
- 下载次数:
- 0次
- 提 供 者:
- ss***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
数据库文件为ImageDatabase,其中表名为:Image,里面已有5组图像信息的数据,包括图像序号,图像名称
图像宽度,图像高度和像素深度。
ConnectionDemo文件夹里面是C#源程序
双击第二个生成好的solution文件,然后可以打开项目文件,点击“解决方案资源管理器”的“Form1.cs”文件可以
看到winform界面。
实现了以下几个功能:
1)."连接数据库测试",即c#和数据库连接,如果连接成功,则会显示“连接数据库成功”的显示框。
2)“向数据库中加入数据”,在左边的图像信息数据库几个文本框中输入数据以后,然后点击“向数据库中加入数据”
按钮,则会向数据库中添加数据,你可以打开数据库ImageDatabase的表Image,查看你加的数据是否写入到数据库中
从而可以验证程序的正确性。
3)“查询插入的数据信息”可以显示你刚添加的数据信息,并以Messagebox形式显示出来,这里实现的只是显示数据库中
-1 I establish the database file for the ImageDatabase, wherein the table name : Image, which already has 5 sets of image data, including image sequence, image nameImage width, height and depth of image pixels.The 2.ConnectionDemo folder there is a C# source ( my computer is used in the 2008 version, do not know in 2005 whether can also be used, if there are any problems contact me again! )3 double-click the second generated a good solution file, then you can open the project file, click on" the solution explorer" "Form1.cs" files can beSee the WinForm interface.4 here I carry out the following functions:1)." To connect to the database test", namely c# and the database connection, if the connection is successful, it will display" to connect to the database successfully" display box.2)" to the database by adding data", in the left image information database for text data, then click on" add data to the database"Button, will be adding to the database data, you can open the database table
图像宽度,图像高度和像素深度。
ConnectionDemo文件夹里面是C#源程序
双击第二个生成好的solution文件,然后可以打开项目文件,点击“解决方案资源管理器”的“Form1.cs”文件可以
看到winform界面。
实现了以下几个功能:
1)."连接数据库测试",即c#和数据库连接,如果连接成功,则会显示“连接数据库成功”的显示框。
2)“向数据库中加入数据”,在左边的图像信息数据库几个文本框中输入数据以后,然后点击“向数据库中加入数据”
按钮,则会向数据库中添加数据,你可以打开数据库ImageDatabase的表Image,查看你加的数据是否写入到数据库中
从而可以验证程序的正确性。
3)“查询插入的数据信息”可以显示你刚添加的数据信息,并以Messagebox形式显示出来,这里实现的只是显示数据库中
-1 I establish the database file for the ImageDatabase, wherein the table name : Image, which already has 5 sets of image data, including image sequence, image nameImage width, height and depth of image pixels.The 2.ConnectionDemo folder there is a C# source ( my computer is used in the 2008 version, do not know in 2005 whether can also be used, if there are any problems contact me again! )3 double-click the second generated a good solution file, then you can open the project file, click on" the solution explorer" "Form1.cs" files can beSee the WinForm interface.4 here I carry out the following functions:1)." To connect to the database test", namely c# and the database connection, if the connection is successful, it will display" to connect to the database successfully" display box.2)" to the database by adding data", in the left image information database for text data, then click on" add data to the database"Button, will be adding to the database data, you can open the database table
(系统自动生成,下载前可以参看下载内容)
下载文件列表
_C#访问数据库
.............\ConnectionDemo
.............\..............\ConnectionDemo
.............\..............\ConnectionDemo.sln
.............\..............\ConnectionDemo.suo
.............\..............\..............\bin
.............\..............\..............\...\Debug
.............\..............\..............\...\.....\ConnectionDemo.exe
.............\..............\..............\...\.....\ConnectionDemo.pdb
.............\..............\..............\...\.....\ConnectionDemo.vshost.exe
.............\..............\..............\...\.....\ConnectionDemo.vshost.exe.manifest
.............\..............\..............\...\Release
.............\..............\..............\ConnectionDemo.csproj
.............\..............\..............\ConnectionDemo.csproj.user
.............\..............\..............\Form1.cs
.............\..............\..............\Form1.Designer.cs
.............\..............\..............\Form1.resx
.............\..............\..............\obj
.............\..............\..............\...\Debug
.............\..............\..............\...\.....\ConnectionDemo.csproj.FileListAbsolute.txt
.............\..............\..............\...\.....\ConnectionDemo.csproj.GenerateResource.Cache
.............\..............\..............\...\.....\ConnectionDemo.exe
.............\..............\..............\...\.....\ConnectionDemo.Form1.resources
.............\..............\..............\...\.....\ConnectionDemo.pdb
.............\..............\..............\...\.....\ConnectionDemo.Properties.Resources.resources
.............\..............\..............\...\.....\TempPE
.............\..............\..............\...\Release
.............\..............\..............\Program.cs
.............\..............\..............\Properties
.............\..............\..............\..........\AssemblyInfo.cs
.............\..............\..............\..........\Resources.Designer.cs
.............\..............\..............\..........\Resources.resx
.............\..............\..............\..........\Settings.Designer.cs
.............\..............\..............\..........\Settings.settings
.............\ImageDatabase.mdf
.............\ImageDatabase_log.ldf
.............\重要说明.txt
.............\ConnectionDemo
.............\..............\ConnectionDemo
.............\..............\ConnectionDemo.sln
.............\..............\ConnectionDemo.suo
.............\..............\..............\bin
.............\..............\..............\...\Debug
.............\..............\..............\...\.....\ConnectionDemo.exe
.............\..............\..............\...\.....\ConnectionDemo.pdb
.............\..............\..............\...\.....\ConnectionDemo.vshost.exe
.............\..............\..............\...\.....\ConnectionDemo.vshost.exe.manifest
.............\..............\..............\...\Release
.............\..............\..............\ConnectionDemo.csproj
.............\..............\..............\ConnectionDemo.csproj.user
.............\..............\..............\Form1.cs
.............\..............\..............\Form1.Designer.cs
.............\..............\..............\Form1.resx
.............\..............\..............\obj
.............\..............\..............\...\Debug
.............\..............\..............\...\.....\ConnectionDemo.csproj.FileListAbsolute.txt
.............\..............\..............\...\.....\ConnectionDemo.csproj.GenerateResource.Cache
.............\..............\..............\...\.....\ConnectionDemo.exe
.............\..............\..............\...\.....\ConnectionDemo.Form1.resources
.............\..............\..............\...\.....\ConnectionDemo.pdb
.............\..............\..............\...\.....\ConnectionDemo.Properties.Resources.resources
.............\..............\..............\...\.....\TempPE
.............\..............\..............\...\Release
.............\..............\..............\Program.cs
.............\..............\..............\Properties
.............\..............\..............\..........\AssemblyInfo.cs
.............\..............\..............\..........\Resources.Designer.cs
.............\..............\..............\..........\Resources.resx
.............\..............\..............\..........\Settings.Designer.cs
.............\..............\..............\..........\Settings.settings
.............\ImageDatabase.mdf
.............\ImageDatabase_log.ldf
.............\重要说明.txt