在C#中创建Access数据库 [英] Create Access Database in C#

查看:123
本文介绍了在C#中创建Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常熟悉DataAdapter并从C#访问Access,但是我试图以编程方式从C#创建一个空白数据库。我无法想象如何做到这一点,并且没有太多运气与MSDN。这里的任何人都知道

如何做到这一点?

I am very familiar with DataAdapters and accessing Access from C#, but am
trying to create a blank database programatically from C#. I can''t figure
out how to do this, and haven''t had much luck with MSDN. Anyone here know
how to do this?

推荐答案

Hello Brian,


如果它是SQL Server数据库,你可以创建一个空白的运行查询:


CREATE DATABASE [数据库名称]

Martin。
Hello Brian,

If it''s a SQL Server database you can create a blank one my running the query:

CREATE DATABASE [database name]

Martin.
我非常熟悉DataAdapter并从C#访问Access,但是我正在尝试用C#编程创建一个空白数据库。我无法弄清楚如何做到这一点,并且没有太多运气与MSDN。
这里的任何人都知道如何做到这一点?
I am very familiar with DataAdapters and accessing Access from C#, but
am trying to create a blank database programatically from C#. I can''t
figure out how to do this, and haven''t had much luck with MSDN.
Anyone here know how to do this?



" Martin Carolan" < MC ****** @ gmail.com>在消息中写道

news:21 ********************* @ news.cable.ntlworld.c om ...
"Martin Carolan" <mc******@gmail.com> wrote in message
news:21*********************@news.cable.ntlworld.c om...
如果它是SQL Server数据库,您可以创建一个空白的运行
查询:

CREATE DATABASE [数据库名称]
If it''s a SQL Server database you can create a blank one my running the
query:

CREATE DATABASE [database name]




您是否真的阅读了OP,特别是主题...?



Did you actually read the OP, particularly the subject...?


Actuall我正在使用MS Office Access 。在我附加到数据库之前,我不知道有什么方法可以执行SQL

命令。我需要创建一个空白数据库,

然后我知道SQL足以做我需要的东西。我只是不知道怎么用
以编程方式创建一个空白数据库。
Actuall I''m using MS Office Access. I don''t know of any way to perform SQL
commands BEFORE i attach to a database. I need to create a blank database,
then I know SQL well enough to do what I need to. I just don''t know how to
create a blank database programatically.


这篇关于在C#中创建Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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