Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Friday, March 23, 2012

query for recordset data into sql table

Hi,

i have a recordset on an asp page and put into session now i want to move this recordset data from session to sql server table.how can i query this.Pls suggest me...

any suggestion will be appriciable...

Thanks

Hi,

depending on your version of ASP the work to be done can differ, but here is the ASP.NET 2.0 approach, if you have the data in the session:

-Get the data from the session
-cast it to a usable data object (like datatable)
-Use a sqlcommand or datadapter to update the data on the database
(depending on your implemented database interface, DML Command Access or SP access this can differ)


HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

thanks jens for the information ...

but i am using classic ASP recordset

Monday, February 20, 2012

Query and textbox difficulty.

Can anyone help please? On a login page i have constructed, u can login (if ur registered) by entering your surname and postcode. Once logged in i would like a welcome note to display the Customer_Name on the Customer homepage. If i use the following statement would it find the items in the specified text boxes and print the correct name?

RsCUSTOMER.open "Select Customer_Name from CUSTOMER WHERE Customer_Surname = the value in the text box AND Customer_PostCode = the value in the text box", Conn

<%Response.write("Welcome" & rsCUSTOMER("Customer_Name")%>

Any help would be much appreciated.
Regards, JohnYou should get the customer name based on your query, though you might want to make sure that the surname and postal code is a unique combination or you'll end up with more than 1 result