Re: Recordset question in ASP .NET
From: Scott M. (s-mar_at_BADSPAMsnet.net)
Date: 02/05/04
- Next message: Cor: "Re: Datatable.clone - C#"
- Previous message: Julian: "Re: Best way to map corresponding columns of two identical tables"
- In reply to: ruca: "Re: Recordset question in ASP .NET"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 5 Feb 2004 15:20:26 -0500
Again, this is not something that you "need" a database or recordset for.
You could simply read the data in from the text file (names and passwords)
and store them in an array, a collection, a hash table, etc.
"ruca" <ruuca@iol.pt> wrote in message
news:O41ZcJC7DHA.452@TK2MSFTNGP11.phx.gbl...
> But then when I want to go to next step (click on a button) I want a
> comparsion of the input password with the key that person have associated
in
> .TXT file.
> How can you sugest to do that?
>
> ruca
>
> "Scott M." <s-mar@BADSPAMsnet.net> escreveu na mensagem
> news:e7ucmzB7DHA.3360@tk2msftngp13.phx.gbl...
> > I would bypass the recordset all together and just read from the text
file
> > (parsing the names) and place them in the drop down box. Also, .NET
uses
> > ADO.NET as its native database connectivity paradigm. ADO.NET doesn't
use
> > the ADO Recordset, it uses a new group of objects for storing
disconnected
> > copies of data.
> >
> >
> > "ruca" <ruuca@iol.pt> wrote in message
> > news:%23opiqoB7DHA.2472@TK2MSFTNGP10.phx.gbl...
> > > Hi,
> > > I want to migrate an ASP aplication to ASP .NET, but it is being more
> > > difficulty that what I think initial.
> > >
> > > In my ASP aplication I have a recordset turn off (that's the name that
I
> > > call him). And you ask me, WHAT'S THAT?
> > > Well...
> > > I need to load to a dropdown control the name of people that are in a
> .TXT
> > > file, and for that I simulate a recordset withouT DB connection. This
is
> > the
> > > code of that recordset:
> > >
> > >
> > >
> > >
> >
>
code:-----------------------------------------------------------------------
> > > -------
> > > 'Initialize
> > > Set rs = Server.CreateObject("ADODB.Recordset")
> > > rs.LockType = 3
> > > rs.CursorLocation = 3
> > > rs.Fields.Append "Cd", 8, 50, 4
> > > rs.Fields.Append "Name", 8, 50, 4
> > > rs.Fields.Append "Pwd", 8, 50, 4
> > > rs.Open
> > >
> > >
> > >
> > > 'Fill the RecordSet
> > > 'I pass the file to the function
> > > Sub ProcessUser(txtLine)
> > > On Error Resume Next
> > > p1 = instr(txtLine,",")
> > > if p1>0 then
> > > Cd=left(txtLine,p1-1)
> > > LineAux = mid(txtLine,p1+1)
> > > pos = instr(LineAux,",")
> > > NameFunc = left(LineAux,pos-1)
> > > Key = mid(LineAux, pos+1)
> > >
> > > if rs.EOF then
> > > rs.AddNew
> > > rs("Cd")=Cd
> > > rs("Name")=NameFunc
> > > rs("Pws")=Key
> > > rs.Update
> > > end if
> > > end if
> > > End Sub
> > >
> > >
> > >
> > > 'Fill dropdown
> > > <%
> > > function fill_drop()
> > > On Error Resume Next
> > > ler_users
> > > %>
> > > <select name="func" size=1>
> > > <option selected>-- escolha -- </option>
> > > <%
> > > rs.MoveFirst
> > > While Not rs.EOF
> > > %>
> > > <option
> > > value="<%=rs.Fields("CdRcs")%>"><%=rs.Fields("NmAbreviado")%></option>
> > > <!--<option
> > >
> value="<%=rs.Fields("CdRcs")%>"><%=rs.Fields("NmAbreviado")%></option>-->
> > > <%rs.MoveNext
> > > WEnd
> > > rs.Close
> > > 'Set Conn = nothing
> > > %>
> > > </select>
> > > <%
> > > end function
> >
>
> --------------------------------------------------------------------------
> > --
> > > --
> > >
> > > The thing is that I'm new on ASP .NET and I can't do this because the
> > > methods are different. So I need your help to give me a good solution
> and
> > > sugest what's better and say what's the "substitute" for
ADODB.Recordset
> > >
> > >
> > > __________________
> > > Hope it will help you (if I try to help you)
> > > Thanks (if you try to help me),
> > > ruca
> > >
> > >
> > >
> >
> >
>
>
- Next message: Cor: "Re: Datatable.clone - C#"
- Previous message: Julian: "Re: Best way to map corresponding columns of two identical tables"
- In reply to: ruca: "Re: Recordset question in ASP .NET"
- Messages sorted by: [ date ] [ thread ]