jierry来自成都

哪儿的?
我也是成都的
在学习.net呢!
还记得经典上这张贴子吧
http://www.blueidea.com/bbs/NewsDetail.asp?id=2271440
[quote]
不能,如果是数据类型的,你录入非数据类型的就会出错。
[/quote]
但在ACCESS中的日期字段中
类似这样的SQL语句是不正确的
DateTime mytime=DateTime.Now();
sql="insert into mytable (mydatetime) values("+mytime+")";
而要写成:
sql="insert into mytable (mydatetime) values('"+mytime+"')";
那不是把DateTime转换成string类型(由于那两个'')

有没有解释?
另,这个是什么问题
[html]
<html>
<head>
<title>Runtime Error</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Runtime Error</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
<br><br>

<b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a &lt;customErrors&gt; tag within a &quot;web.config&quot; configuration file located in the root directory of the current web application. This &lt;customErrors&gt; tag should then have its &quot;mode&quot; attribute set to &quot;Off&quot;.<br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
&lt;system.web&gt;
&lt;customErrors mode=&quot;Off&quot;/&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

</td>
</tr>
</table>

<br>

<b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the &quot;defaultRedirect&quot; attribute of the application's &lt;customErrors&gt; configuration tag to point to a custom error page URL.<br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

&lt;!-- Web.Config Configuration File --&gt;

&lt;configuration&gt;
&lt;system.web&gt;
&lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

</td>
</tr>
</table>

<br>

</body>
</html>
[/html]
posted @ 2005-10-10 10:56  jierry  阅读(280)  评论(1)    收藏  举报