连接语法不对 [英] Connection syntax not right
问题描述
有人可以告诉我这种语法有什么问题吗?我只是
真的很沮丧。我试图使用应用程序启动路径
这个,但由于某种原因它不喜欢这种语法。请问
在这里看起来不合适吗?
Dim strOTRConnection As String =" Provider = Microsoft.Jet.OLEDB.4.0;
数据源= Application.Startup& otr.mdb
我知道这是问题,因为如果我将数据库移动到我的C盘
它运行正常。
谢谢
***通过Developersdex发送 http://www.developersdex.com ***
不要只是参加USENET ......获得奖励!
Can someone please tell me what is wrong with this syntax? I am just
really frustrated. I am trying to use the application startup path for
this but it does not like this syntax for some reason. Does something
look out of place here?
Dim strOTRConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source= Application.Startup & otr.mdb"
I know this is the problem because if I move my database to my C drive
it works fine.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
推荐答案
你好Kim,
首先,你在otr.mdb之前没有开头的报价。 (s / b
otr.mdb)。另外,debug或messagebox.show来获取application.startup所代表的实际字符串
- 你是否必须附加\;它是什么?
HTH,
Bernie Yaeger
金伯利威金斯 <き******** @ greenwaymedical.com>在留言中写道
新闻:ey ************** @ TK2MSFTNGP10.phx.gbl ...
Hi Kim,
First of all, you don''t have an opening quote before otr.mdb" (s/b
"otr.mdb"). Also, debug or messagebox.show to get the actual string
represented by application.startup - do you have to append "\" to it?
HTH,
Bernie Yaeger
"Kimberley Wiggins" <ki********@greenwaymedical.com> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
有人可以告诉我这个语法有什么问题?我只是非常沮丧。我正在尝试使用应用程序启动路径,但由于某些原因它不喜欢这种语法。这里有什么东西看起来不合适吗?
Dim strOTRConnection As String =" Provider = Microsoft.Jet.OLEDB.4.0;
Data Source = Application.Startup& otr.mdb
我知道这是问题,因为如果我将数据库移动到我的C盘
它工作正常。
谢谢
***通过Developersdex http://www.developersdex.com 发送** *
不要只是参加USENET ......获得奖励!
Can someone please tell me what is wrong with this syntax? I am just
really frustrated. I am trying to use the application startup path for
this but it does not like this syntax for some reason. Does something
look out of place here?
Dim strOTRConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source= Application.Startup & otr.mdb"
I know this is the problem because if I move my database to my C drive
it works fine.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
承担此Application.Startuppath是mdb所在的位置位于:
数据源= Application.StartupPath" \otr.mdb"
" Kimberley Wiggins" <き******** @ greenwaymedical.com>在留言中写道
新闻:ey ************** @ TK2MSFTNGP10.phx.gbl ...
Assumming this Application.Startuppath is where the mdb is located:
Data Source = Application.StartupPath "\otr.mdb"
"Kimberley Wiggins" <ki********@greenwaymedical.com> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
有人可以告诉我这个语法有什么问题?我只是非常沮丧。我正在尝试使用应用程序启动路径,但由于某些原因它不喜欢这种语法。这里有什么东西看起来不合适吗?
Dim strOTRConnection As String =" Provider = Microsoft.Jet.OLEDB.4.0;
Data Source = Application.Startup& otr.mdb
我知道这是问题,因为如果我将数据库移动到我的C盘
它工作正常。
谢谢
***通过Developersdex http://www.developersdex.com 发送** *
不要只是参加USENET ......获得奖励!
Can someone please tell me what is wrong with this syntax? I am just
really frustrated. I am trying to use the application startup path for
this but it does not like this syntax for some reason. Does something
look out of place here?
Dim strOTRConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source= Application.Startup & otr.mdb"
I know this is the problem because if I move my database to my C drive
it works fine.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
没有我不必附加它,我调试它以找出
应用程序启动路径,我确实在正确的路径中有数据库。
你说我在otr.mdb之前没有开头报价,它不喜欢
。它告诉我,当我在那里放一个
时,预计结束语。不,我不必附加到文件,只显示。
谢谢
***通过Developersdex发送 http://www.developersdex.com ***
不要只是参加USENET .. .get奖励它!
No I don''t have to append to it and I debugged it to find out the
application startup path and I do have the database in the correct path.
You said I did not have an opening quote before otr.mdb, it doesn''t like
that. It tells me that a end of statement is expected when I put one
there. No, I don''t have to append to the file, just display.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
这篇关于连接语法不对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!