创建MS Access数据库 [英] Creating MS Access database

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

问题描述

你好,


我正在尝试在运行时创建一个MS访问文件,但我偶然发现了一些问题。
。 />
1.当我使用数据类型adUnsignedInt时,我收到错误(无效类型)。

2.我必须使用哪种数据类型来创建自动编号字段?

3.我必须使用哪种数据类型来创建OLE对象字段?


我目前正在使用Microsoft ActiveX Data Objects Library 2.8并使用

引擎类型5.


有人可以帮我吗?


thnx

解决方案

On Sun,2006年11月19日16:09:53 +0100,C#Beginner < de ******** @ orange.nlwrote:


>你好,

我现在在试图在运行时创建一个MS访问文件,但我偶然发现了一些问题。
1。当我使用数据类型adUnsignedInt时,我收到错误(无效类型)。
2。我必须使用哪种数据类型来创建自动编号字段?
3。我必须使用哪种数据类型来创建OLE对象字段?

我目前正在使用Microsoft ActiveX Data Objects Library 2.8并使用
引擎类型5.
有人可以帮我吗?

thnx



您尝试创建的数据库是否始终相同(架构方面)?如果它是

为什么不只是分发一个空的数据库,所有的表等已经创建了

并在你想要创建一个新的时复制它?


此外,DAO仍然是这样做的可行选择。要使用它,只需将

dll添加到您的项目中。


祝您的项目好运,


Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com


< blockquote>嗨奥的斯,


感谢您的快速响应。


我正在重写我在VB6中使用DAO开发的程序,在
中,用户能够根据需要创建他们自己的数据库(无模式)。我喜欢这样做。


我的问题是DataTypeEnum包含很多类型,其中一些不能使用
(所以它似乎)。所以我需要了解每种类型是否以及如何工作。

OLE-object类型和Autonumber是DatatTypeEnum中不可用的类型的例子

,所以我必须为他们找到一种替代类型。


有很多例子说明如何在运行时创建一个访问数据库,但是

我仍​​然找不到解决我的问题。大多数例子都不是写的

c#不管怎样。


thnx


DD

Otis Mukinfus < ph *** @ emailaddress.comschreef在bericht

新闻:c0 *************************** ***** @ 4ax.com ...


On Sun,2006年11月19日16:09:53 +0100,C#Beginner < de ******** @ orange.nl>

写道:


>>你好,

我正在尝试在运行时创建一个MS访问文件,但我偶然发现了一些问题。
1。当我使用数据类型adUnsignedInt时,我收到错误(无效类型)。
2。我必须使用哪种数据类型来创建自动编号字段?
3。我必须使用哪种数据类型来创建OLE对象字段?

我目前正在使用Microsoft ActiveX Data Objects Library 2.8并使用
引擎类型5.
有人可以帮助我吗?

thnx



您尝试创建的数据库是否始终相同(架构方面)?如果

它是

为什么不只是分发一个包含所有表格的空DB等等

创建

当你想创建一个新的时复制它吗?


此外,DAO仍然是一个可行的选择。使用它只需

添加

你的项目的dll。


祝你的项目好运,


Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com



" C#Beginner" < de ******** @ orange.nlwrote in message

news:45 ********************** *@news.wanadoo.nl ...


有很多例子说明如何在运行时创建一个访问数据库,

但是我仍然无法找到解决问题的方法。无论如何,大多数例子都不是b $ b写c#。



你真的读过奥的斯回复了吗?


这个Access有多少个不同的版本(当然,当然,你的意思是

Jet)数据库你需要创建......?


Hi there,

I''m currently trying to create a MS access file at runtime, but I stumble
into some problems.
1. When I use Datatype adUnsignedInt I get an error (invalid type).
2. Which datatype must I use to create an autonumbering field?
3. Which datatype must I use to create an OLE-object field?

I''m currently using Microsoft ActiveX Data Objects Library 2.8 and using
engine type 5.

Can anybody help me out here?

thnx

解决方案

On Sun, 19 Nov 2006 16:09:53 +0100, "C# Beginner" <de********@orange.nlwrote:

>Hi there,

I''m currently trying to create a MS access file at runtime, but I stumble
into some problems.
1. When I use Datatype adUnsignedInt I get an error (invalid type).
2. Which datatype must I use to create an autonumbering field?
3. Which datatype must I use to create an OLE-object field?

I''m currently using Microsoft ActiveX Data Objects Library 2.8 and using
engine type 5.

Can anybody help me out here?

thnx

Is the database you are trying to create always the same(schema-wise)? If it is
why not just distribute an empty DB with all the tables, etc. already created
and copy it when you want to create a new one?

Additionally, DAO is still a viable option for doing this. To use it just add
the dll to your project.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com


Hi Otis,

Thanks for the rapid respons.

I''m currently rewriting a program which I developed in VB6 using DAO, in
which users were able to create
their own databases at demand (no schema). I like to keep it that way.

My problem is that DataTypeEnum contains a lot of types of which some can''t
be used (so it seems). So I need to understand if and how each type works.
OLE-object type and Autonumber are examples of types which aren''t available
in DatatTypeEnum, so I must find an alternative type for them.

There are a lot of examples how the create a access database at runtime, but
I still can''t find the solution for my problem. Most examples aren''t writing
c# anyway.

thnx

DD
"Otis Mukinfus" <ph***@emailaddress.comschreef in bericht
news:c0********************************@4ax.com...

On Sun, 19 Nov 2006 16:09:53 +0100, "C# Beginner" <de********@orange.nl>
wrote:

>>Hi there,

I''m currently trying to create a MS access file at runtime, but I stumble
into some problems.
1. When I use Datatype adUnsignedInt I get an error (invalid type).
2. Which datatype must I use to create an autonumbering field?
3. Which datatype must I use to create an OLE-object field?

I''m currently using Microsoft ActiveX Data Objects Library 2.8 and using
engine type 5.

Can anybody help me out here?

thnx


Is the database you are trying to create always the same(schema-wise)? If
it is
why not just distribute an empty DB with all the tables, etc. already
created
and copy it when you want to create a new one?

Additionally, DAO is still a viable option for doing this. To use it just
add
the dll to your project.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com



"C# Beginner" <de********@orange.nlwrote in message
news:45***********************@news.wanadoo.nl...

There are a lot of examples how the create a access database at runtime,
but I still can''t find the solution for my problem. Most examples aren''t
writing c# anyway.

Did you actually read Otis'' reply?

How many different versions of this Access (by which, of course, you mean
Jet) database do you need to create...?


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

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