Ask a Question related to ASP.NET, Design and Development.

  1. #1

    Default RECORDSET

    I am trying to make a data base for a ASP website. But
    when I try to write the code DataSet11.Recordset.Addnew.
    Appears error when I compile to test the data base.

    I hope to receive help.

    NAIME ESTEVES Guest

  2. Similar Questions and Discussions

    1. ASP Recordset Help!
      Hi, I have been trying to construct a results page in dreamweaver/asp if i put a search in with one parameter it works fine (ie, select name from...
    2. Using a Recordset
      I'm trying to expand my web design skills by learning how to include some dynamic content in a site. Currently I have an Access database, and...
    3. Is this possible with a recordset?
      Hello, Looking for some expert help. I am using Dreamweaver MX 2004. I have a need that I was wondering if it was possible accomplish using a...
    4. ADO - Recordset
      I was wondering if anyone can help me. I've converting an already existing system (designed in Access which produces reports for the accounts dept)...
    5. RecordSet.Move or RecordSet.AbsolutePosition??
      Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to...
  3. #2

    Default Re: RECORDSET

    Are you talking about ASP or ASP.NET?
    This group is for ASP.NET

    For ASP 3.0 questions try this newsgroup:
    microsoft.public.inetserver.asp.general

    If you're talking about ASP.NET, recordsets aren't used any more with
    ADO.NET.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "NAIME ESTEVES" <NESTEVES@HOUSTON.RR.COM> wrote in message
    news:a0aa01c34686$c7d03960$a401280a@phx.gbl...
    > I am trying to make a data base for a ASP website. But
    > when I try to write the code DataSet11.Recordset.Addnew.
    > Appears error when I compile to test the data base.
    >
    > I hope to receive help.
    >

    Steve C. Orr, MCSD Guest

  4. #3

    Default Re: RECORDSET

    i guess you have a wrong code here.

    the dataset does not have Recordset object, if you are trying to add a new
    row in a dataset, please use the code below:

    Dim drNew as DataRow = ds.Tables(0).Rows.AddNew()
    drNew(0) = "..."
    ds.Tables(0).Rows.Add(drNew)

    "NAIME ESTEVES" <NESTEVES@HOUSTON.RR.COM> wrote in message
    news:a0aa01c34686$c7d03960$a401280a@phx.gbl...
    > I am trying to make a data base for a ASP website. But
    > when I try to write the code DataSet11.Recordset.Addnew.
    > Appears error when I compile to test the data base.
    >
    > I hope to receive help.
    >

    Benjie Fallar Guest

  5. #4

    Default Re: RECORDSET

    read book

    "NAIME ESTEVES" <nesteves9723@hotmail.com> wrote in message
    news:efthnlvRDHA.3880@tk2msftngp13.phx.gbl...
    >
    >
    > I received a Error massage with "ds is not declare" from the code you
    > sent me. Please advise how can I declare the ds. I tried to use:
    > Dim ds as Data
    > or
    > Dim ds as Table
    >
    > But its not work.
    >
    > Thank in advance
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    David Waz... Guest

  6. #5

    Default Re: RECORDSET



    I already solve the problem, but now I have another problem, when I
    launch the ASP Application it's not appear the field I already design on
    the webform.

    Can you help me??

    Thank in advance

    Naime

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    NAIME ESTEVES Guest

  7. #6

    Default recordset

    hi ...

    i am checking if the password is matching with either the
    student_table or the teacher_table then it shoudl
    display "welStudent.asp" page else it sould go to another
    page called "newstudent.asp".

    I have created 2 recodsets because i need 2 different
    queries to be executed using 2 diff tables:

    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open ConnString
    QUERY1 = "SELECT student_password from student_info Where
    student_username='" &Request("txtNAME")&"'"
    Set RSA = Conn.Execute(QUERY1)

    QUERY2 = "SELECT teacher_password from teacher_info Where
    teacher_username='" &Request("txtNAME")&"'"
    Set RSA2 = Conn.Execute(QUERY2)

    its continously giving error on this line :-(((

    if RSA("student_password")=Request("txtPASSWORD") or RSA2
    ("teacher_password")=Request("txtPASSWORD") then

    cant i use the 2 recordsets??? in one if- then-else
    condition? I am pasting my script for reference.
    I ahve even tried to create 2 adodb connections (which may
    sound sillly ...!) but nothign is working....

    any thots?? or suggestions

    thanks in advance for such painful help!
    janet

    here goes my script==>

    <%
    DIM RSA
    DIM QUERY1
    DIM RSA2
    DIM QUERY2
    DIM ConnString
    DIM Conn
    DIM flagST

    ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    ConnString = ConnString & "Port=3306; "
    ConnString = ConnString & "DATABASE=test; "

    If Request("txtNAME")<>"" and Request("txtPassword") <> ""
    and Request("login") = "Login" Then
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open ConnString

    QUERY1 = "SELECT student_password from student_info
    Where student_username='" &_
    Request("txtNAME")&"'"
    Set RSA = Conn.Execute(QUERY1)

    QUERY2 = "SELECT teacher_password from teacher_info
    Where teacher_username='" &_
    Request("txtNAME")&"'"
    Set RSA2 = Conn.Execute(QUERY2)

    If RSA.EOF and RSA2.EOF then
    flagST = "NotStudTeach"
    response.write "none"
    else
    flagST = "StudTeach"
    response.write "any"
    end if

    If RSA.EOF and RSA2.EOF Then
    Response.Write("Invalid Login!!! ")
    server.transfer("newStudent.asp")
    end if

    if RSA("student_password")=Request("txtPASSWORD") or
    RSA2("teacher_password")=Request("txtPASSWORD") then
    server.transfer("welStudent.asp")
    else
    server.transfer("newstudent.asp")
    end if
    ' RSA.Close
    ' Set RSA = Nothing
    ' RSA2.Close
    ' Set RSA2 = Nothing
    ' Conn.Close
    ' Set Conn = Nothing
    else
    Response.write "Please enter Both the Student Id
    and the Password!!!"
    server.transfer("loginDB.asp")
    End If
    %>

    janet Guest

  8. #7

    Default recordset

    Error Type:
    (0x80020009)
    Exception occurred.
    /myweb/loginDB2.asp, line 39


    this line 39 is :
    if RSA("student_password")=Request.form("txtPASSWORD" ) or
    RSA2("teacher_password")=Request.form("txtPASSWORD ") then

    (i tried with request adn request.form both !)

    >-----Original Message-----
    >What is the actual text of the error message you are
    >receiving?
    >
    >
    >
    >
    >>-----Original Message-----
    >>hi ...
    >>
    >>i am checking if the password is matching with either
    the
    >>student_table or the teacher_table then it shoudl
    >>display "welStudent.asp" page else it sould go to
    another
    >>page called "newstudent.asp".
    >>
    >>I have created 2 recodsets because i need 2 different
    >>queries to be executed using 2 diff tables:
    >>
    >>Set Conn = Server.CreateObject("ADODB.Connection")
    >>Conn.Open ConnString
    >>QUERY1 = "SELECT student_password from student_info
    Where
    >>student_username='" &Request("txtNAME")&"'"
    >>Set RSA = Conn.Execute(QUERY1)
    >>
    >>QUERY2 = "SELECT teacher_password from teacher_info
    Where
    >>teacher_username='" &Request("txtNAME")&"'"
    >>Set RSA2 = Conn.Execute(QUERY2)
    >>
    >>its continously giving error on this line :-(((
    >>
    >>if RSA("student_password")=Request("txtPASSWORD") or RSA2
    >>("teacher_password")=Request("txtPASSWORD") then
    >>
    >>cant i use the 2 recordsets??? in one if- then-else
    >>condition? I am pasting my script for reference.
    >>I ahve even tried to create 2 adodb connections (which
    >may
    >>sound sillly ...!) but nothign is working....
    >>
    >>any thots?? or suggestions
    >>
    >>thanks in advance for such painful help!
    >>janet
    >>
    >>here goes my script==>
    >>
    >><%
    >>DIM RSA
    >>DIM QUERY1
    >>DIM RSA2
    >>DIM QUERY2
    >>DIM ConnString
    >>DIM Conn
    >>DIM flagST
    >>
    >>ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    >>ConnString = ConnString & "Port=3306; "
    >>ConnString = ConnString & "DATABASE=test; "
    >>
    >>If Request("txtNAME")<>"" and Request("txtPassword")
    ><> ""
    >>and Request("login") = "Login" Then
    >> Set Conn = Server.CreateObject("ADODB.Connection")
    >> Conn.Open ConnString
    >>
    >> QUERY1 = "SELECT student_password from student_info
    >>Where student_username='" &_
    >> Request("txtNAME")&"'"
    >> Set RSA = Conn.Execute(QUERY1)
    >>
    >> QUERY2 = "SELECT teacher_password from teacher_info
    >>Where teacher_username='" &_
    >> Request("txtNAME")&"'"
    >> Set RSA2 = Conn.Execute(QUERY2)
    >>
    >> If RSA.EOF and RSA2.EOF then
    >> flagST = "NotStudTeach"
    >> response.write "none"
    >> else
    >> flagST = "StudTeach"
    >> response.write "any"
    >> end if
    >>
    >> If RSA.EOF and RSA2.EOF Then
    >> Response.Write("Invalid Login!!! ")
    >> server.transfer("newStudent.asp")
    >> end if
    >>
    >> if RSA("student_password")=Request("txtPASSWORD") or
    >>RSA2("teacher_password")=Request("txtPASSWORD" ) then
    >> server.transfer("welStudent.asp")
    >> else
    >> server.transfer("newstudent.asp")
    >> end if
    >>' RSA.Close
    >> ' Set RSA = Nothing
    >> ' RSA2.Close
    >>' Set RSA2 = Nothing
    >> ' Conn.Close
    >> ' Set Conn = Nothing
    >>else
    >> Response.write "Please enter Both the Student Id
    >>and the Password!!!"
    >> server.transfer("loginDB.asp")
    >>End If
    >>%>
    >>
    >>.
    >>
    >.
    >
    janet Guest

  9. #8

    Default Re: recordset

    Did you bother checking if either recordset was empty? What you might
    consider doing is:


    if NOT RSA.EOF then RSAPass = RSA("student_password")
    if NOT RSA2.EOF then RSA2Pass = RSA2("teacher_password")
    if (RSAPass = request.form("txtPassword") OR RSA2Pass =
    request.form("txtPassword")) then
    ...

    Out of curisoity, since student_password is in a table called student_info,
    isn't the student_ prefix a little redundant? What other kind of password
    could it be?



    "janet" <knowgroup@hotmail.com> wrote in message
    news:017301c368bf$8fc0df10$a101280a@phx.gbl...
    > hi ...
    >
    > i am checking if the password is matching with either the
    > student_table or the teacher_table then it shoudl
    > display "welStudent.asp" page else it sould go to another
    > page called "newstudent.asp".
    >
    > I have created 2 recodsets because i need 2 different
    > queries to be executed using 2 diff tables:
    >
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Conn.Open ConnString
    > QUERY1 = "SELECT student_password from student_info Where
    > student_username='" &Request("txtNAME")&"'"
    > Set RSA = Conn.Execute(QUERY1)
    >
    > QUERY2 = "SELECT teacher_password from teacher_info Where
    > teacher_username='" &Request("txtNAME")&"'"
    > Set RSA2 = Conn.Execute(QUERY2)
    >
    > its continously giving error on this line :-(((
    >
    > if RSA("student_password")=Request("txtPASSWORD") or RSA2
    > ("teacher_password")=Request("txtPASSWORD") then
    >
    > cant i use the 2 recordsets??? in one if- then-else
    > condition? I am pasting my script for reference.
    > I ahve even tried to create 2 adodb connections (which may
    > sound sillly ...!) but nothign is working....
    >
    > any thots?? or suggestions
    >
    > thanks in advance for such painful help!
    > janet
    >
    > here goes my script==>
    >
    > <%
    > DIM RSA
    > DIM QUERY1
    > DIM RSA2
    > DIM QUERY2
    > DIM ConnString
    > DIM Conn
    > DIM flagST
    >
    > ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    > ConnString = ConnString & "Port=3306; "
    > ConnString = ConnString & "DATABASE=test; "
    >
    > If Request("txtNAME")<>"" and Request("txtPassword") <> ""
    > and Request("login") = "Login" Then
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Conn.Open ConnString
    >
    > QUERY1 = "SELECT student_password from student_info
    > Where student_username='" &_
    > Request("txtNAME")&"'"
    > Set RSA = Conn.Execute(QUERY1)
    >
    > QUERY2 = "SELECT teacher_password from teacher_info
    > Where teacher_username='" &_
    > Request("txtNAME")&"'"
    > Set RSA2 = Conn.Execute(QUERY2)
    >
    > If RSA.EOF and RSA2.EOF then
    > flagST = "NotStudTeach"
    > response.write "none"
    > else
    > flagST = "StudTeach"
    > response.write "any"
    > end if
    >
    > If RSA.EOF and RSA2.EOF Then
    > Response.Write("Invalid Login!!! ")
    > server.transfer("newStudent.asp")
    > end if
    >
    > if RSA("student_password")=Request("txtPASSWORD") or
    > RSA2("teacher_password")=Request("txtPASSWORD") then
    > server.transfer("welStudent.asp")
    > else
    > server.transfer("newstudent.asp")
    > end if
    > ' RSA.Close
    > ' Set RSA = Nothing
    > ' RSA2.Close
    > ' Set RSA2 = Nothing
    > ' Conn.Close
    > ' Set Conn = Nothing
    > else
    > Response.write "Please enter Both the Student Id
    > and the Password!!!"
    > server.transfer("loginDB.asp")
    > End If
    > %>
    >

    Aaron Bertrand - MVP Guest

  10. #9

    Default Recordset

    Hi

    I am using DW7 and I am trying to use the filter part of the recordset. I have
    a repeating table with all of the links in the test database showing, but when
    I try to use the filter part of the recordset the information disapears when I
    click live view . I think I might be going wrong in the url parameters bit, but
    not too sure.

    Here is the page so far, but can't get individual profiles when you click the
    links.[url]http://phwebdesign.co.uk/userinfo.php[/url]

    Thanks in advance,

    Phil

    Make it so! Guest

  11. #10

    Default Recordset

    Hi
    Does anyone know about recordsets, I am trying to link the info you select on
    one page to display the individual information on another. This is all from a
    database. As you can see when you click peoples name on this
    pagehttp://www/phwebdesign.co.uk/userinfo.php it should display their info on
    it's own on the next page. But the filter part of a recordset seems to be
    beating me at the moment. Any ideas how you do this?

    Thanks

    Phil

    Make it so! Guest

  12. #11

    Default Re: Recordset

    this seems like an issue that should be in the application section of the macromedia forums.

    but if you post your recorset information here i'll try to help
    acidrain9 Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139