Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 7th, 2008, 11:59 AM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default who help me?(asp.net 2.0 running error)

oh~ my god!!i'm not found the error.
error mssage:(two error)

1.comma,')',or a valid expression
2.name 'objcmd' is not declared

this is my bulding's code:

<%@ Page Language="VB" %>
<%@ Import Namespace="system.data"%>
<%@ Import Namespace="system.data.oledb"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    Sub stngo(ByVal sender As Object, ByVal e As EventArgs)
        Dim objconn As New OleDbConnection()
        objconn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("db1.mdb")
        objconn.Open()
        Dim objcmd As New OleDbCommand("insert into info(name,age,form) values ('"&txtname.Text&"','"&txtage.text&"','"&txtform.t ext&"')",objconn)
        objcmd.ExecuteNonQuery()
        objconn.Close()
    End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>add</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server" Height="16px" Text="name£º" Width="57px"></asp:Label>
        <asp:TextBox ID="TxtName" runat="server"></asp:TextBox><br />
        <br />
        <asp:Label ID="Label2" runat="server" Text="age£º"></asp:Label>&nbsp;
        <asp:TextBox ID="TxtAge" runat="server"></asp:TextBox><br />
        <br />
        <asp:Label ID="Label3" runat="server" Height="13px" Text="form£º" Width="121px"></asp:Label>
        <asp:TextBox ID="TxtForm" runat="server"></asp:TextBox><br />
        <br />
        <input id="Button1" type="button" value="button" onserverclick="stngo" />
        </div>
    </form>
</body>
</html>


 
Old October 7th, 2008, 01:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And we are not found the error either...

Sorry, but if you want help, try to provide more information. For example, try posting the full error message including the details. Additionally, tells us where the error occurs, how you get it and so on.

Without that information, I doubt anyone can (or wants to) help you....

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old October 8th, 2008, 11:27 AM
Registered User
 
Join Date: Sep 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks imar.okey,i'm goto found error message now.
:);)






Similar Threads
Thread Thread Starter Forum Replies Last Post
VS .NET has detected...not running ASP.NET version rstelma ASP.NET 1.0 and 1.1 Professional 17 May 24th, 2008 04:04 AM
Error while running javascript code in ASP.NET Pag fozia_izhar ASP.NET 1.0 and 1.1 Professional 2 December 20th, 2006 03:39 AM
ASP.net is not running farsfar2 ASP.NET 1.0 and 1.1 Basics 2 December 20th, 2005 01:18 PM
"Server not running ASP.NET 1.1" error message arashj General .NET 1 September 7th, 2004 05:49 AM
ASP.Net: Running 1.1 but getting an error from 1.0 andrewba ASP.NET 1.0 and 1.1 Basics 3 August 9th, 2004 04:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.