使用mysql访问calander [英] Acces calander with mysql

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

问题描述

您好,


我已经使用了帖子中的日历:


http://bytes.com/topic/access/answer...ccess-calendar


它很棒,只是我想要的东西。制作它的人的道具。但是我有一个问题。


calander获取数据的表是mysql

并且它没有显示任何日期。在calander盒子里。


如果我将表转换为本地表,一切正常。我认为它与mysql(YYYY-MM-DD)中的日期符号有关,当我将其转换为本地(访问)表时,访问将datenotaion转换回(dd-mm-yyyy)。


奇怪的是,Mysql中的日期是yyyy-mm-dd,但在访问中显示为​​dd-mm-yyyy。所以访问以某种方式已经将其转换为正确的游戏。可悲的是,日历不起作用。


我有2个选项:

- 在VBA代码中调整以便它可以工作。

- 创建一个本地(access)表,其中包含与Mysql表同步的日历的相关数据。


但在这两种情况下我都是'卡住了。


感谢任何帮助

解决方案

好的,正如你所发现的:在内部,日期访问使用的格式,无论本地日期设置是什么,都在MM / DD / YYYY HH:MM:SS中。格式。


确保您使用的是#您的日期。


如果您愿意,请将您做出更改的代码发布到日历中参考MYSQL表,这将是最有帮助的。


请确保使用工具栏上的 [CODE /] 按钮格式化代码。


感谢您的回复,


你说#是什么意思?约会日期。你可以更具体吗。


这是填充日历的代码:

展开 | 选择 | Wrap | 行号


我使用了日历版的日历,并没有对脚本进行任何更改。我只更改了链接表和字段。



可以直接在访问FE中打开链接表吗?


如果没有,那么这可以解释为什么当你转换时/将SQLServer导入本地表的东西开始按预期工作。


ADezii真的是日历的专家。项目并将更好地了解更好的解决方案。


以防万一:如何为Access中的链接表创建与SQL Server的无DSN连接


Hello,

I''ve used the calendar from the post:


http://bytes.com/topic/access/answer...ccess-calendar

It works great and was just the thing i was looking for. Props for those who made it. But i have one problem.

The table from where the calander gets it data is mysql
and it doesn''t show any dates. in the calander boxes.

If i convert the table to a local table everything works just fine. I think it has something to do with de date notation in mysql (YYYY-MM-DD) and when i convert it to a local (access) table access converts the datenotaion back to (dd-mm-yyyy).

The strange thing is that the date in Mysql is yyyy-mm-dd, but is shown in access as dd-mm-yyyy. So access somehow already converts it to the correct natation. Sadly the calendar doesn''t work.

I''ve thougt of 2 options:
- Make an ajustment in the VBA code so it works.
- Make a local (acces) table with the relevant data for the calender that is in sync with the Mysql table.

But in both cases i''m stuck.

Any help is appreciated

解决方案

OK, as you''ve discovered: Internally, the date format that access uses, no matter what the local date setting is, is in the "MM/DD/YYYY HH:MM:SS" format.

Make sure that you are using "#" around your dates.

If you will please post the code where you made the change to reference the MYSQL table within the calendar it would be most helpful.

Please make sure to format the code using the [CODE/] button on the toolbar.


Thanks for your reply,

What do you mean by putting "#" around the dates. Can you be more specific.

This is the code to populate the calendar:

Expand|Select|Wrap|Line Numbers


I''ve used the widescreen version of the calender and haven''t made any changes to the script. I''ve only changed the linked table and fields.

Can open the linked table directly within the access FE?

If not, then this might explain why when you convert/import the SQLServer to a local table things start to work as expected.

ADezii is really the expert on "The Calendar" project and will have a better insight as to the better solution.

Just in case: How to create a DSN-less connection to SQL Server for linked tables in Access


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

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