Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Read DataSet

Reply
Thread Tools

Read DataSet

 
 
ruca
Guest
Posts: n/a
 
      02-06-2004
Sorry I'm new on this,

I have this in code:
I'm reading data from a .TXT file
----------------------------------------------------
Sub ProcessUser(txtLine)
On Error Resume Next

Dim p1, pos as Integer
Dim Cd, LineAux, NomeFunc, Pass, strLabel as String
Dim row as DataRow

p1 = instr(txtLine,",")
if p1>0 then
Cd=left(txtLine,p1-1)
LineAux = mid(txtLine,p1+1)
pos = instr(LineAux,",")
NomeFunc = left(LineAux,pos-1)
Pass = mid(LineAux, pos+1)
'Response.Write CdFunc & "-" & NomeFunc & "-" & Pass
strLabel="CdRcs = "& "'" & Cd & "'"
response.write(Cd)

row = table.NewRow()
row("CdRcs") = Cd
row("NmAbreviado") = NomeFunc
row("Key") = Pass

table.Rows.Add(row)

end if
End Sub

Function ler_users() As DataTable
On Error Resume Next
Dim objFicheiro, LerUser as Object

objFicheiro = CreateObject("Scripting.fileSystemObject")
LerUser = objFicheiro.OpenTextFile(Server.MapPath("func.txt" ))

While not LerUser.AtEndOfStream
ProcessUser (LerUser.ReadLine)
End While

LerUser.Close
LerUser = nothing

return table
End Function
---------------------------------------------

I want to put in a dropdownlist the name of people but I can't. For that I
have this:

aspropDownList id="cxFunc" runat="server" DataSource="<% # ler_users() %>"
DataTextField="NmAbreviado" DataMember="CdRcs" DataValueField="CdRcs"


Can you help me???

--
Thanks (if you help me)
Hope this helps (if I help you)

ruca


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet and dataSet JimO ASP .Net 2 03-08-2006 02:39 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 02:42 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 1 10-31-2003 02:39 AM
DataSet to DataSet Joseph D. DeJohn ASP .Net 1 08-04-2003 03:25 AM



Advertisments
 



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