来自Access的查询 [英] Queries from Access

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

问题描述

Hello all


我有一个奇怪的问题,我有一个列出用户的页面(GridView),这个

列表链接到另一个页面当你点击名字。第二个

页面列出了他们在上个月收到的所有电话

(GridView)。我通过一个Querystring从

首先传递给第二页到第二页来完成这个。


第二页GridView数据源基于一个SQL语句:

" WHERE(supportid =?)AND

((右(左([datetaken],8),5))=右(DateAdd(" m" ,-1,日期()),5))


[datetaken]字段是收到电话的日期和时间。


这在我的计算机上运行它在本地主机下工作正常。但是,当我将它复制到我的IIS服务器V6时,它没有在第二个

页面上显示任何记录。


其他一切正常,第一页上的列表工作正常,即使

第二页加载也没问题,但是没有电话。


有没有人有一个线索为什么?我已经尝试了几乎所有我能想到的东西

但没有任何区别。

非常感谢提前


James

Hello all

I am having a odd problem, I have a page that lists users (GridView), this
list links through to another page when you click on the name. The second
page lists all phone calls they received during the previous month
(GridView). I have done this by a Querystring passing SupportId from the
first to the second page.

The second page GridView data source is based on an SQL statement:
"WHERE (supportid = ?) AND
((Right(Left([datetaken],8),5))=Right(DateAdd("m",-1,Date()),5))"

the [datetaken] field is the date and time the call was received.

This works fine on my computer running it under a local host. However, when
I copy it to my IIS server V6, it does not show any records on the second
page.

Everything else works fine, the list on the first page works ok, even the
second page loads fine but it says No Calls.

Does anyone have a clue why? I have tried almost everything I can think off
but nothing makes a difference.
Many thanks in advance

James

推荐答案

" James" < Ja *** @ discuss.microsoft.com写信息

新闻:20 ************************* ********* @ microsof t.com ...
"James" <Ja***@discussions.microsoft.comwrote in message
news:20**********************************@microsof t.com...

有没有人知道为什么?我已经尝试了几乎所有我能想到的东西

off

但是没有任何区别。
Does anyone have a clue why? I have tried almost everything I can think
off
but nothing makes a difference.



如果您支付


a)可能会有所帮助


b )告诉小组你已经尝试了什么


c)发布了你得到的任何错误信息/ EventLog条目。


大概,您的网站运行的帐户不仅在Jet数据库本身上具有读写

权限,而且在Jet数据库所在的文件夹中也具有读取权限。可以创建相关的锁定

数据库(* .ldw)......?

It might be helpful if you

a) posted your code

b) told the group what you''ve already tried

c) posted any error message / EventLog entry you''re getting.

Presumably, the account that your site is running under has read-write
permissions not only on the Jet database itself but also on the folder where
the Jet database resides so that it can create the associated locking
database (*.ldw)...?


你好,


我发布了我的代码,WHERE(supportid =?)AND

((右(左([datetaken],8),5))=右(DateAdd(" m" ,-1,Date()),5))"


这是select语句的SQL部分。其余的只是


SELECT supportid,datetaken,[number],firstname,lastname FROM memberlist


我也说过我没有得到任何错误消息,它只是说

是0记录。


因为第一页工作正常,(这只是基于一个简单的SELECT a

表)我假设连接没有问题或者读写数据库的数据是
。无论如何我已经检查了这个。


我已经将文件夹设置为完全读写权限,每个人只需要对b / b进行测试它仍然不起作用,包括互联网访客帐户。

但是我确实注意到锁定文件没有出现。


除此之外,我很难过去寻找什么。


任何想法都会很棒。


James


" Mark Rae"写道:
Hello,

I did post my code, "WHERE (supportid = ?) AND
((Right(Left([datetaken],8),5))=Right(DateAdd("m",-1,Date()),5))"

That is the SQL part of the select statement. The rest is just

SELECT supportid, datetaken, [number], firstname, lastname FROM memberlist

I also said that I do not get any error messages, it just says that there
are 0 records.

As the first page works fine, (that is just based on a simple SELECT from a
table) I am assuming there is no problem with the connection or Read Write to
the database. I have checked this anyway.

I have set the folder to full read write permissions for everyone just to
test it and it still does not work, including the internet guest account.
However I do notice that the lock file is not appearing.

Other than that I am stumped as to what to look for.

Any ideas would be great.

James

"Mark Rae" wrote:

" James" < Ja *** @ discuss.microsoft.com写信息

新闻:20 ************************* ********* @ microsof t.com ...
"James" <Ja***@discussions.microsoft.comwrote in message
news:20**********************************@microsof t.com...

有没有人知道为什么?我已经尝试了几乎所有我能想到的东西

off

但是没有任何区别。
Does anyone have a clue why? I have tried almost everything I can think
off
but nothing makes a difference.



如果你这可能会有所帮助


a)发布你的代码


b )告诉小组你已经尝试了什么


c)发布了你得到的任何错误信息/ EventLog条目。


大概,您的网站运行的帐户不仅在Jet数据库本身上具有读写

权限,而且在Jet数据库所在的文件夹中也具有读取权限。可以创建相关的锁定

数据库(* .ldw)...?


It might be helpful if you

a) posted your code

b) told the group what you''ve already tried

c) posted any error message / EventLog entry you''re getting.

Presumably, the account that your site is running under has read-write
permissions not only on the Jet database itself but also on the folder where
the Jet database resides so that it can create the associated locking
database (*.ldw)...?


" James" < Ja *** @ discussion.microsoft.com写信息

新闻:7C ************************* ********* @ microsof t.com ...
"James" <Ja***@discussions.microsoft.comwrote in message
news:7C**********************************@microsof t.com...

我发布了我的代码,WHERE(supportid =?)AND

((右(左([datetaken],8),5))=右(DateAdd(" m", - 1,Date()),5))"


这是select语句的SQL部分。其余的只是


SELECT supportid,datetaken,[number],firstname,lastname FROM memberlist
I did post my code, "WHERE (supportid = ?) AND
((Right(Left([datetaken],8),5))=Right(DateAdd("m",-1,Date()),5))"

That is the SQL part of the select statement. The rest is just

SELECT supportid, datetaken, [number], firstname, lastname FROM memberlist



好​​吧,那个'肯定是你的SQL语句......

Well, that''s your SQL statement certainly...


我还说我没有收到任何错误消息
I also said that I do not get any error messages



实际上,你没有,但无论如何......

Actually, you didn''t, but no matter...


由于第一页工作正常,(这只是基于一个简单的SELECT

a

table)我假设连接没有问题,或者读写了数据库中的

。无论如何我已经检查了这个。
As the first page works fine, (that is just based on a simple SELECT from
a
table) I am assuming there is no problem with the connection or Read Write
to
the database. I have checked this anyway.



OK。

OK.


但是我注意到锁文件没有出现。
However I do notice that the lock file is not appearing.



啊......好吧,自从我做任何Jet数据库工作以来已经有一段时间但我已经

从不已知无法创建相应的ldb文件的情况,

特别是在网络共享上...如果你询问了Jet数据库本身的文件属性

,它的访问日期是每次更新

查询...?

Ah... Well, it''s been a while since I did any Jet database work but I''ve
never known a situation when the corresponding ldb file isn''t created,
especially on a network share... If you interrogate the file properties of
the Jet database itself, is its Accessed date being updated every time it is
queried...?


这篇关于来自Access的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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