Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with code pls....
Message
From
29/07/2003 21:05:55
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Help with code pls....
Miscellaneous
Thread ID:
00814781
Message ID:
00814781
Views:
32
<%@ Page Language="VB"   
<%@ import Namespace="system.data.sqlclient"   
<script runat="server">

    ' Insert page code here
         '
    
    
        Sub Button1_Click(sender As Object, e As EventArgs)
    
        Dim conPubs As SqlConnection
        Dim cmdSelect As SqlCommand
        Dim dtrAuthors As SqlDataReader
        dim test as string
    
        test = textbox1.text
    
         conPubs = New SqlConnection( "server='Merlin'; trusted_connection=true; database='Solotest'" )
         cmdSelect = New SqlCommand( "Insert into student (name) values ('test') ") <====im not sure if this is correct
        conPubs.Open()
    
    
        dtrAuthors = (cmdselect, conPubs) <====im encountering errors here..
        dtrAuthors.executequery() <=====same with here
        'cmdselect.Connection.Open()
        'cmdselect.ExecuteNonQuery()
        'cmdselect.Connection.Close()
    
         End Sub

</script>
<html>
<head>
</head>
<body background="images/rmclogofade.gif">
    <form runat="server">
        <p align="left">
            <asp:TextBox id="TextBox1" style="Z-INDEX: 100; LEFT: 220px; POSITION: absolute; TOP: 37px" runat="server"></asp:TextBox>
            <asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 118px; POSITION: absolute; TOP: 248px" onclick="Button1_Click" runat="server" Text="Add"></asp:Button>
            <asp:Label id="Label1" style="Z-INDEX: 100; LEFT: 113px; POSITION: absolute; TOP: 40px" runat="server">User
            Id</asp:Label>
        </p>
        <!-- Insert content here -->
    </form>
</body>
</html>
Reply
Map
View

Click here to load this message in the networking platform