Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 August 12th, 2003, 11:42 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recordset problem?


Hi, i'm trying to get ASP.net to talk to a Faircom database, not having much luck. I read somewhere that ADO recordsets no longer exist, so have tried converting to a dataset without much luck. Is there anything obviously wrong with this code? Any ideas on how i can get it running?

Cheers, John.R


'if session("notfound")="TRUE" then
'label1.text = "The last entered card: " & =session("CardNo") & " Could not be found."
'session("notfound") = ""
'session("CardNo") = ""
'end if


Sub Button1_Click(sender As Object, e As EventArgs)
dim cardid
Dim rst, URLline, CardNo, CardName, CardBalance, i, Temp, myconnection, strsql, test, AccountNo, NewCardID
i = "0"
cardid = txtCardID.text

if cardid = "" then
    lblresult.text = "No ID Entered."
else
    lblresult.text = cardid

'connect

    myconnection = Server.CreateObject("ADODB.Connection")
        myconnection.connectionstring = "File Name=c:\faircom.UDL;"
        myconnection.open
   rst = Server.CreateObject("ADODB.recordset")
'query
    strsql = "Select * from Prim where Name ='" & cardid & "'"
    rst.open(strsql,myconnection)
    if rst.eof = false then
' CardNo = trim(rst(0))
' CardName = rst(1)
' CardBalance = rst(17)
' NewCardID = rst(2)

        lbl1.text = rst
' lbl2.text = CardBalance

    else
        'Response.Redirect ""

        lbl2.text = rst
    end if

end if

End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with recordset rwahdan BOOK: Access 2003 VBA Programmer's Reference 1 March 13th, 2008 05:03 AM
Recordset Problem hugoscp Classic ASP Professional 0 July 10th, 2007 05:59 AM
recordset problem jdsflash ASP.NET 1.0 and 1.1 Basics 1 May 16th, 2006 11:49 AM
Problem In Recordset zaeem Classic ASP Databases 2 October 22nd, 2003 01:34 AM
Problem with recordset am_po_28 Pro VB 6 1 August 25th, 2003 10:17 AM





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