不在VS中运行时,Console App exe不起作用

时间:2012-05-13 07:42:21

标签: c# visual-studio-2010 console-application

我创建了一个控制台应用程序,它使用ODBC从名为MYOB的应用程序中读取文件。

当我在VS中使用F5运行应用程序时它运行得很好但是当我点击bin文件夹中的exe时它不起作用。输出很长但基本上我认为它说'无法打开连接' - 点击.exe并在VS下运行它有什么区别?

如果可能,任何人都可以向我建议我可以尝试使其工作吗?

编辑 * 这是控制台应用的输出 *

[TRACECLIENT]
All=FATAL|SNO|ERRORS
[ODBC32]
MessagePrefix=[MYOB ODBC]
TraceFile=
TraceOptions=0
PromptForUID=0
********************************************************

**********Contents of file:<C:\MYOBODBC\schema\oadrd.ini>*********
[test_local]
Type=DB3
Schema_Path=.\test
Remarks=Test DBase III IP source
[memory_local]
Type=MEM
Connect_String=memory
Remarks=Test Memory IP source
********************************************************

**********Contents of file:<C:\MYOBODBC\schema\oainfo.ini>*********
[DAM]
1=0
8=1
11=N
14=\
16=OpenRDA
17=OpenRDA
18=5.50.20.0
19=Y
20=Y
21=Y
22=0
23=2
24=2
25=N
26=1
27=Y
28=4
29="
30=128
31=128
32=128
33=128
34=128
35=128
36=Y
37=Y
38=Y
39=owner
40=procedure
41=.
42=NULL
43=9
44=1
45=table
46=2
47=OAUSER
48=0
49=16777215
50=16547839
51=3
52=630783
53=0
54=0
55=0
56=0
57=0
58=0
59=0
60=0
61=0
62=0
63=0
64=0
65=0
66=0
67=0
68=0
69=0
70=0
71=0
72=7
73=N
74=2
75=1
78=0
79=0
80=0
81=3
82=0
83=0
84=0
85=1
86=37867
87=Y
88=2
89=HINT,IDENTIFIED
90=N
91=15
92=7
93=4
94=*(){}|:;
95=31
96=3
97=0
98=0
99=0
100=0
101=0
102=0
103=N
104=0
105=32768
106=0
107=32
108=8192
109=0
110=0
111=N
112=8192
113=Y
114=1
115=73
116=0
117=0
118=1
119=0
120=0
121=0
122=0
123=0
124=0
125=0
126=0
127=0
128=0
129=0
130=0
131=0
132=1
133=0
134=1
136=0
137=0
138=0
139=0
140=0
141=1
142=0
143=1
144=0
145=0
146=1
147=0
148=3
149=0
150=0
151=0
152=1
153=2
154=2
155=7
156=2
157=2
158=3184
159=63
160=16135
161=592
162=3184
163=11
164=238
165=0
166=1
167=1
168=0
8194=.
8195=1
8196=7
8197=1
10000=1995
10001=2
10002=Y
10003=Y
10004=ISO=8859-1
10005=128
10022=0
********************************************************

**********Environment Variables  *********
OPENRDA_INI = <NOT_SET>
PATH = <C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP
\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program
Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NV
IDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32
\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microso
ft Team Foundation Server 2010 Power Tools\;C:\Program Files (x86)\Microsoft Tea
m Foundation Server 2010 Power Tools\Best Practices Analyzer\;C:\Program Files (
x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-St
atic;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Microsoft Visual Stu
dio 10.0\VC;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program File
s (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Serv
er\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Progra
m Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C>
LD_LIBRARY_PATH = <NOT_SET>
SHLIB_PATH = <NOT_SET>
CLASSPATH = <.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip>
ODBCINI = <NOT_SET>
********************************************************
CLI :  [TID: 37F4]:[Sun May 13 18:26:28.271 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:32.628 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:36.315 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:39.786 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:44.841 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:49.530 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:52.782 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:54.685 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:56.991 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:26:59.563 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:01.779 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:02.947 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:03.817 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:04.805 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:05.654 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:06.490 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:07.391 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:08.194 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:08.970 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:09.775 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:10.561 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:11.325 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:12.057 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:12.779 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:13.538 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:14.200 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:14.973 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:15.662 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:16.357 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:17.042 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:17.706 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:18.387 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:19.111 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:19.758 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:20.458 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:21.130 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:21.847 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:22.524 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:23.175 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:23.854 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:24.543 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:25.219 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:25.872 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:26.548 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened
CLI :  [TID: 37F4]:[Sun May 13 18:27:27.264 2012] rdacstmt.c:99: *** rda_cliAllo
cStmt: connection is not opened

0 个答案:

没有答案
相关问题