SQL后端/访问前端 [英] SQL Backend/Access Frontend

查看:112
本文介绍了SQL后端/访问前端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有使用SQL数据库作为后端的经验,而对于前端使用Access

。我有一些问题:

1. SQL数据库是否有表格?


2. Access如何连接到SQL数据库中的数据?链接,

导入,或者???


3.今天早些时候有一个关于DAO和ADO的帖子。在线程中它表示当后端是SQL数据库时,ADO非常有用。可以

有人解释一下吗?


4. Access前端可以更新SQL数据库后端中的数据吗?怎么样?


5.是否有网站提供这些问题的答案?


感谢所有输入!!!


Steve

PC数据表

I have zero experience with using a SQL database for a backend and Access
for a frontend. I have some questions:
1. Does an SQL database have tables?

2. How does Access connect to the data in an SQL database? Linking,
importing, or ???

3. Earlier today there was a thread regarding DAO and ADO. In the thread it
was said that ADO is very useful when the backend is a SQL database. Could
someone explain that?

4. Can an Access frontend update data in a SQL database backend? How?

5. Is there a website that provides answers to these questions?

Thanks for all input!!!

Steve
PC Datasheet

推荐答案

" PC数据表" <无**** @ nospam.spam>写在

新闻:RF **************** @ newsread1.news.atl.earthli nk.net:
"PC Datasheet" <no****@nospam.spam> wrote in
news:RF****************@newsread1.news.atl.earthli nk.net:
我没有使用SQL数据库作为后端和
访问前端的经验。我有一些问题:
1. SQL数据库是否有表格?

2. Access如何连接到SQL数据库中的数据?链接,
导入或???

3.今天早些时候有一个关于DAO和ADO的帖子。在
线程中,当后端是SQL数据库时,ADO非常有用。有人可以解释一下吗?

4. Access前端可以更新SQL数据库后端中的数据吗?怎么样?

5.是否有网站提供这些问题的答案?

感谢您的所有投入!

Steve
PC数据表
I have zero experience with using a SQL database for a backend and
Access for a frontend. I have some questions:
1. Does an SQL database have tables?

2. How does Access connect to the data in an SQL database? Linking,
importing, or ???

3. Earlier today there was a thread regarding DAO and ADO. In the
thread it was said that ADO is very useful when the backend is a SQL
database. Could someone explain that?

4. Can an Access frontend update data in a SQL database backend? How?

5. Is there a website that provides answers to these questions?

Thanks for all input!!!

Steve
PC Datasheet




你好史蒂夫,


您的问题的一些答案是:


1)是


2)您可以通过ODBC链接到表。您还可以通过Access使用ODBC链接导入和导出

。 (TransferSpreadsheet,TransferText)


3)处理SQL数据时,ADO非常有用。但是你可以使用DAO来完成很多任务。我倾向于在编码中使用更多DAO,因为我更熟悉它。这是一个例子:


''***声明变量

Dim db as DAO.Database

Dim rs as DAO.Recordset

Dim strSql as String


''***设置变量

strSql =" SELECT * FROM tblTemp;"


''*** CurrentDB是您正在使用的Access数据库

设置db = CurrentDb


''***指定记录集

设置rs = db.OpenRecordset(strSql)


''***从这里你会看到价值记录集

''***并根据结果生成您想要的任何内容。


*注意---为了使用DAO Access数据库必须有一个参考

a DAO库(DAO360.dll,DAO351.dll等...)。 ADO也是如此。

但是不要试图同时使用它们。它会导致问题。

选择一个并坚持下去。


4)Access前端当然可以更新SQL表。例如:


a)链接到带有ID字段的SQL表。


(ID字段可以是我通常使用的任何东西

字段,数据类型为< int>表示整数。)


b)完成此操作后,您可以使用Access查询---

(追加,更新,删除)以更改数据。


5) http://www.mvps.org/access/ 是一个很好的网站开始


这些是一般答案和正如许多计算机人会告诉你的那样

是100种做同样事情的方法。


希望这些帮助!


strvariant



Hi Steve,

Some answers to your questions are:

1) Yes

2) You would link to the tables via ODBC. You can also import and export
using an ODBC link via Access. (TransferSpreadsheet, TransferText)

3) ADO is useful when dealing with SQL data. However you can use DAO to
accomplish many tasks. I tend to use more DAO in my coding because I am
more familiar with it. This is an example:

''***Declare the variables
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim strSql as String

''***Set the variables
strSql = "SELECT * FROM tblTemp;"

''***CurrentDB is the Access database you are using
Set db = CurrentDb

''***Specify the recordset
Set rs = db.OpenRecordset(strSql)

''***From here you would read the Recordset for values
''***and generate whatever you wanted, based on the results.

*Note---In order to use DAO the Access database must have a Reference to
a DAO Library (DAO360.dll, DAO351.dll, etc...). This is true for ADO too.
But don''t try to use both at the same time. It WILL cause problems.
Choose one and stick too it.

4) An Access front-end can certainly update SQL tables. For example:

a) Link to a SQL table with an ID field.

(The ID Field can be anything but I have generally used
fields with a datatype of <int> for integer.)

b) Once this has been done you can use Access queries ---
(Append, Update, Delete) to change the data.

5) http://www.mvps.org/access/ is an excellent site to begin with

These are general answers and as many computer-folk will tell you there
are 100''s of ways to do the same thing.

Hope these help!

strvariant


On Mon,2005年4月11日20:33:35 -0500,strvariant< no.email.com>写道:


使用DAO的存储过程很难吗?

例如你怎么称之为sproc返回一个输出

参数并捕获该值?在ADO中有特定的

规定(CreateParameter的Direction参数
Command对象的
方法)。


史蒂夫,如果您拥有Access2000或更高版本,您已经拥有了SQL Server。

是,你拥有MSDE,轻 SQL Server的版本。文件>新的>

项目(新数据库)。


-Tom。

On Mon, 11 Apr 2005 20:33:35 -0500, strvariant <no.email.com> wrote:

Isn''t it true that it''s hard to work with stored procedures from DAO?
For example how would you call a sproc that returns an Output
parameter and capture that value? In ADO there are specific
provisions for that (the Direction argument to the CreateParameter
method of the Command object).

Steve, if you own Access2000 or up, you already own SQL Server. That
is, you own MSDE, the "light" version of SQL Server. File > New >
Project (New Database).

-Tom.

" PC数据表 <无**** @ nospam.spam>在
新闻中写道:RF **************** @ newsread1.news.atl.earthl ink.net:
"PC Datasheet" <no****@nospam.spam> wrote in
news:RF****************@newsread1.news.atl.earthl ink.net:
I没有使用SQL数据库作为后端和
访问前端的经验。我有一些问题:
1. SQL数据库是否有表格?

2. Access如何连接到SQL数据库中的数据?链接,
导入或???

3.今天早些时候有一个关于DAO和ADO的帖子。在
线程中,当后端是SQL数据库时,ADO非常有用。有人可以解释一下吗?

4. Access前端可以更新SQL数据库后端中的数据吗?怎么样?

5.是否有网站提供这些问题的答案?

感谢您的所有投入!

Steve
PC数据表
I have zero experience with using a SQL database for a backend and
Access for a frontend. I have some questions:
1. Does an SQL database have tables?

2. How does Access connect to the data in an SQL database? Linking,
importing, or ???

3. Earlier today there was a thread regarding DAO and ADO. In the
thread it was said that ADO is very useful when the backend is a SQL
database. Could someone explain that?

4. Can an Access frontend update data in a SQL database backend? How?

5. Is there a website that provides answers to these questions?

Thanks for all input!!!

Steve
PC Datasheet



史蒂夫,

您的问题的一些答案是:

1)是的/>
2)您将通过ODBC链接到表。您还可以通过Access使用ODBC链接导入和导出
。 (TransferSpreadsheet,TransferText)

3)处理SQL数据时,ADO非常有用。但是,您可以使用DAO来完成许多任务。我倾向于在编码中使用更多DAO,因为我对它更熟悉。这是一个例子:

''***声明变量
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim strSql as String

''***设置变量
strSql =" SELECT * FROM tblTemp;"

''*** CurrentDB是你的Access数据库使用
设置db = CurrentDb

''***指定记录集
设置rs = db.OpenRecordset(strSql)

''** *从这里你会读取Recordset的值
''***并根据结果生成你想要的任何内容。

*注意---为了使用DAO访问权限数据库必须有一个DAO库(DAO360.dll,DAO351.dll等)的参考。 ADO也是如此。
但不要试图同时使用它们。它会导致问题。
选择一个并坚持下去。

4)Access前端当然可以更新SQL表。例如:
a)链接到带有ID字段的SQL表。

(ID字段可以是任何东西,但我通常使用
字段和数据类型为< int>表示整数。)

b)完成此操作后,您可以使用Access查询---
(追加,更新,删除)来更改数据。 br />
5) http://www.mvps.org/access/ 是一个很好的网站开始

这些是一般的答案,因为许多计算机人会告诉你那里有100个方法来做同样的事情。

希望这些帮助!

strvariant



Hi Steve,

Some answers to your questions are:

1) Yes

2) You would link to the tables via ODBC. You can also import and export
using an ODBC link via Access. (TransferSpreadsheet, TransferText)

3) ADO is useful when dealing with SQL data. However you can use DAO to
accomplish many tasks. I tend to use more DAO in my coding because I am
more familiar with it. This is an example:

''***Declare the variables
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim strSql as String

''***Set the variables
strSql = "SELECT * FROM tblTemp;"

''***CurrentDB is the Access database you are using
Set db = CurrentDb

''***Specify the recordset
Set rs = db.OpenRecordset(strSql)

''***From here you would read the Recordset for values
''***and generate whatever you wanted, based on the results.

*Note---In order to use DAO the Access database must have a Reference to
a DAO Library (DAO360.dll, DAO351.dll, etc...). This is true for ADO too.
But don''t try to use both at the same time. It WILL cause problems.
Choose one and stick too it.

4) An Access front-end can certainly update SQL tables. For example:

a) Link to a SQL table with an ID field.

(The ID Field can be anything but I have generally used
fields with a datatype of <int> for integer.)

b) Once this has been done you can use Access queries ---
(Append, Update, Delete) to change the data.

5) http://www.mvps.org/access/ is an excellent site to begin with

These are general answers and as many computer-folk will tell you there
are 100''s of ways to do the same thing.

Hope these help!

strvariant








PC数据表 <无**** @ nospam.spam>在消息中写道

新闻:RF **************** @ newsread1.news.atl.earthli nk.net ...

"PC Datasheet" <no****@nospam.spam> wrote in message
news:RF****************@newsread1.news.atl.earthli nk.net...
我没有使用SQL数据库作为后端和访问
的前端经验。我有一些问题:
1. SQL数据库是否有表格?

2. Access如何连接到SQL数据库中的数据?链接,
导入或???

3.今天早些时候有一个关于DAO和ADO的帖子。在线程
中说,当后端是SQL数据库时,ADO非常有用。有人可以解释一下吗?

4. Access前端可以更新SQL数据库后端中的数据吗?怎么样?

5.是否有网站提供这些问题的答案?

感谢您的所有投入!

Steve
PC数据表
I have zero experience with using a SQL database for a backend and Access
for a frontend. I have some questions:
1. Does an SQL database have tables?

2. How does Access connect to the data in an SQL database? Linking,
importing, or ???

3. Earlier today there was a thread regarding DAO and ADO. In the thread
it
was said that ADO is very useful when the backend is a SQL database. Could
someone explain that?

4. Can an Access frontend update data in a SQL database backend? How?

5. Is there a website that provides answers to these questions?

Thanks for all input!!!

Steve
PC Datasheet



什么是SQL后端?如果它就像Jet后端那么它将会b / b
可能做的一切都好。


What''s an SQL backend? If it''s something like a Jet backend then it will
probably do everything OK.


这篇关于SQL后端/访问前端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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