|
发表于 30-6-2005 11:17 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 30-6-2005 11:18 AM
|
显示全部楼层
max5007 于 30-6-2005 08:36 AM 说 :
有些SQL STATEMENT在MS SQL 里可以用,但在MYSQL里是不能用的^^
好像有点复杂 |
|
|
|
|
|
|
|
发表于 5-7-2005 05:07 PM
|
显示全部楼层
我在用着VB.NET+MySQL做我的final year project...
其实我也不是很会
边做边学咯...
不懂就想办法问人...
多几个星期就要VIVA了...
呵呵~~~
有点紧张 |
|
|
|
|
|
|
|
发表于 5-7-2005 11:55 PM
|
显示全部楼层
请问这CODING的问题出在哪里??~~
我是用ASP.NET CONNECT MYSQL来INSERT DATA!!~~
<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.ODBC" %>
<script runat="server">
Sub Insertdata(Source as Object, E as EventArgs)
Dim strConn as string
strConn = "Driver={MySQL ODBC 3.51 Driver};uid=root;password=123456;Server=localhost;Database=test;"
Dim MySQL as string = "Insert into registration (userid, password, name, email) values (@Userid, @Password, @Name, @Email)"
Dim MyConn as New ODBCConnection(strConn)
Dim Cmd as New ODBCCommand(MySQL, MyConn)
cmd.Parameters.Add(New ODBCParameter("@Userid", uid.text))
cmd.Parameters.Add(New ODBCParameter("@Password", psw.text))
cmd.Parameters.Add(New ODBCParameter("@Name", uname.text))
cmd.Parameters.Add(New ODBCParameter("@Email", email.text))
MyConn.Open()
cmd.ExecuteNonQuery
MyConn.Close()
End Sub
</script>
<html>
<head>
<form id="form1" runat="Server">
</form>
</head>
<body>
<div align="center">
</div>
<form runat="server">
<table style="WIDTH: 580px" border="0">
<tbody>
<tr>
<td align="right">
User ID:</td>
<td>
<asp:TextBox id="uid" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Password:
</td>
<td>
<asp:TextBox id="psw" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Confirm Password:
</td>
<td>
<asp:TextBox id="con_psw" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Full Name:
</td>
<td>
<asp:TextBox id="uname" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
Email Adress:
</td>
<td>
<p>
<asp:TextBox id="email" runat="server"></asp:TextBox>
</p>
</td>
</tr>
<tr>
<td align="middle" colspan="2">
<asp:button id="button1" onclick="Insertdata" runat="server" Text="Submit"></asp:button>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
刚开始学的!!~~
全部CODE都是东抄点,西抄些!!~~ |
|
|
|
|
|
|
|
发表于 7-7-2005 09:24 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 7-7-2005 04:12 PM
|
显示全部楼层
他的EROR MSG是这个.........
Server Error in '/localhost' Application.
A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A page can have only one server-side Form tag.]
System.Web.UI.Page.OnFormRender(HtmlTextWriter writer, String formUniqueID) +311
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +35
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +263
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|