473,480 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Read DataSet

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:

asp:DropDownList 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
Nov 18 '05 #1
0 933

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1782
by: Marty | last post by:
Hi, Ok I use the OLEDBConnector and dataset to retrieve data from my Access DB. I have a problem to read/parse the dataset and I would like to know if I am using the right object to reach my...
1
10239
by: Sal | last post by:
Hello all, I am working on a project with the following characteristics: 1. Load data from a SQL server table to an xml file 2. Read the xml file into a dataset. 3. Load data from the...
0
4673
by: Peter | last post by:
I am having a problem reading an Excel file that is XML based. The directory I am reading contains Excel files that can be of two types. Either generic Microsoft based or XML based. I am reading...
15
4733
by: ruca | last post by:
Hi, Can I read a .TXT File to a DataSet? How can I do that? I want to read his lines to a DropDownList. This lines are the names of employees that I export from an application that I have. I...
5
7764
by: Guadala Harry | last post by:
This has to be easy... I have a DataSet stored in the Session object. I simply need to read it later and get the following error: Cannot implicitly convert type 'object' to 'System.Data.DataSet'...
3
2294
by: Programmer | last post by:
Hi all I wan't to know if i'm able to read mail from a mail server. My mail server is a pop3 server (UNIX) and i want to be able to get the mails from an aspx or an asmx. with out using external...
1
1836
by: D. Shane Fowlkes | last post by:
How can I loop through the rows of a DataSet and send the "fields" to the Function as I've attempted to do in my code? Error is at "While dsLineItems.Read()" . I'm trying to construct a Sub which...
16
453
by: Adda | last post by:
If I cycle through the MdiChildActivate event of the parent form I can read text in a textbox on the child mdiform -- console.writeline(Me.ActiveMdiChild.Controls(1).Text) But if I have a sub...
0
1252
by: Hetal | last post by:
Hi there.. I am a VB6 developer so kinda trying to figure how to work with VB.NET. I have a scenario where i have a DataSet bound to a combo box, and i would like to read a row from the DataSet...
0
2259
by: tom | last post by:
When I try to read in a csv file it gives me this error message. 'Cannot update. Database or object is read-only.' If I change the extension to txt it processes just fine. I have googled all...
0
7033
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6726
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4763
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4468
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2987
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2974
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.