数据库基础知识请帮我 [英] Database basics plz help me

查看:74
本文介绍了数据库基础知识请帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个新应用.而且我想知道如何使用数据库.所以请帮帮我.我已经完成了谷歌搜索,但是什么也没做.我看到了一些代码,但是我不知道将它们放在哪里.按钮还是什么?我正在VB10上工作请帮助我

I work on a new app. and I want to know how to use a database. So please help me out .I have done googling but nothing .I saw some codes but I don''t know where to put them .In a Button or What ? I work on VB10 please help me

推荐答案

您非常需要拿起一本有关Visual Studio和数据库连接的书并仔细阅读.
这是最好的学习方法.
You seriously need to pick up a book on Visual Studio and database connectivity and go through it.
That is the best way to learn.


我认为您可能会从编写这样的教程中受益.
http://www.homeandlearn.co.uk/net/nets12p1.html [ ^ ]
I think you would probably benefit from doing a tutorial like this one.
http://www.homeandlearn.co.uk/net/nets12p1.html[^]


您需要在配置文件中添加代码


you need to add a code at config file


<connectionStrings>
        <add name="ConnectionString" connectionString="Data Source=localhost;Initial Catalog=Databasename;Persist Security Info=True;User ID=sa;Password=sa"/>
	</connectionStrings>



该代码在VB中

昏暗的ConnectionString作为String = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ToString()

现在,您可以在数据源中插入/更新/删除所需的任何内容



This Code is in VB

Dim ConnectionString As String = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ToString()

Now You can insert/update/delete whatever you want at datasource

Dim SqlAdapter As New SqlDataAdapter("Select * From Test ", ConnectionString)
               Dim SqlDataset As New DataSet
               SqlAdapter.Fill(SqlDataset)


这篇关于数据库基础知识请帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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