View Single Post
Old June 3rd, 2003, 05:26 PM
Klom Dark Klom Dark is offline
Registered User
Join Date: Jun 2003
Location: Omaha, Nebraska, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

Yes, that's a good book, I've got the C# version. :)

My biggest confusion at this time is adapting to how to work with the database objects. I hate adding/editing info with raw SQL statements. Could someone show me how to translate the following ASP code into C#-based ASPX code? I am confused on talking to ODBC, and the syntax on ADO objects. Thanks! :D

    Set dbConn = Server.CreateObject("ADODB.Connection")
    dbConn.Open "DSN=ROTFOH;uid=xxxxxxx;pwd=xxxxxxx"

    Set rsMonster = CreateObject("ADODB.Recordset")
    rsMonster.Open "Monster", dbConn, adOpenStatic, adLockOptimistic


    rsMonster("Descr") = Request.Form("Descr")
    rsMonster("AC") = Request.Form("AC")
    rsMonster("HD") = Request.Form("HD")
    rsMonster("NumAppearing") = Request.Form("NumAppearing")
    rsMonster("DamageH") = Request.Form("DamageH")
    rsMonster("DamageL") = Request.Form("DamageL")
    rsMonster("AttackDesc") = Request.Form("AttackDesc")
    rsMonster("AttPerRound") = Request.Form("AttPerRound")


    Response.Write("Monster Record Created!<p>")
    Response.Write("<form action=AdminMonsterEditor.asp method=post>")
    Response.Write("<input type=submit value='Monster Editor'>")