Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 January 4th, 2005, 03:13 PM
Authorized User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default i need a response to my q..:-)

i have made a form to insert data into sql server and here is the code :
Sub doInsert(Source as Object, E as EventArgs)



    Dim MySQL as string = "Insert into user_data (user_id,[timestamp],non_availability,cause_of_non_availability) values (@ppid,@tst,@noava,@cnoava)"
    Dim myConn As SqlConnection = New SqlConnection("data source=tstsrv;uid=;pwd=;database=user")
    Dim Cmd as New SQLCommand(MySQL, MyConn)
    cmd.Parameters.Add(New SQLParameter("@ppid", pumpi.text))
    cmd.Parameters.Add(New SQLParameter("@tst", tmstm.text))
    cmd.Parameters.Add(New SQLParameter("@noava", navl.text))
    cmd.Parameters.Add(New SQLParameter("@cnoava", cnaval.text))

     MyConn.Open()
    cmd.ExecuteNonQuery
    label1.visible="true"
    BindData()
    MyConn.Close()
    label1.text = "Your data has been received!"
End Sub
--------------------------------------------------------------

and i have a function to view the data:




Sub BindData()

'Dim MySQL as string = "Select * from user_data where [timestamp] = @tmstm" Dim myConn As SqlConnection = New SqlConnection( "data source=tstsrv;uid=;pwd=;database=user")
     Dim MySQL as string
     MySQL= "Select * from user_data "& _
    "Where [timestamp] = @tst "
     Dim Cmd1 as New SQLCommand(MySQL, MyConn)
    cmd1.Parameters.Add(New SQLParameter("@tst", tmstm.text))

    Dim ds as DataSet=New DataSet()
    Dim Cmd as New SQLDataAdapter(MySQL,MyConn)
    Cmd.Fill(ds,"user_data")
    MyDataGrid.Datasource=ds.Tables("user_data").Defau ltView
    MyDataGrid.DataBind()
End Sub

---------------------------------------------------------------
but the problem is that i want to view the data that is recently inserted or lets say according to the time stamp field in the form as i high lighted above,would you plz help me





 
Old January 14th, 2005, 05:10 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I don't see what the problem is. Is this not working as you expect it to?





Similar Threads
Thread Thread Starter Forum Replies Last Post
response of AT Commands bobwith5 .NET Framework 2.0 0 October 31st, 2007 08:54 AM
response.isclientconnected crmpicco Classic ASP Databases 0 March 15th, 2006 04:58 AM
columnlabel(still no response) marholarnkij_S VB How-To 0 February 14th, 2005 09:46 PM
Response.Flush jeffm_22 Classic ASP Professional 1 October 20th, 2003 08:39 AM
NO PHP response mkoohian BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 5 October 12th, 2003 02:59 PM





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