Data Set ---- Data Row ( How to retrieve column data in a array )

Question regarding Dataset in ASP.NET

ds = DBFunctions.RunSelect("select * from emp where Userid='" & vUserID & "'")

If (ds.Tables(0).Rows.Count > 0) Then

Dim dr As DataRow = ds.Tables(0).Rows(0)

location= dr("location")  -- this statement only gives me the first locaiton


userid          location

111              AAA
111              BBB
111              CCC
111              DDD

i have once user id which belongs to 4 location

i want to have all the location stored in an array or some way. for same userid

Let me know

thanz in advance..

10/6/2005 10:52:20 PM 16182 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 26

ArrayList alLocation = new ArrayList();

foreach (DataRow dr in ds.Tables[0].Rows)



Dot Specialists | Send Gifts to Pakistan | Pakistan Gifts Mall
10/7/2005 2:58:11 PM

Similar Artilces:

Object reference not set to an instance of an object......array object problem..
 Hi! Im trying to create multiply arrays of an object thats ( the object "class" have I created myself, but I doubt the problem is there..since it all worked fine before I used arrays) is the code Im trying to run   connection.Open(); OleDbCommand getImagesMaxIDdb = new OleDbCommand("SELECT [ID] FROM [Image gallery] ORDER BY [ID] DESC;", connection); OleDbDataReader readIMGMAXID = getImagesMaxIDdb.ExecuteReader(); readIMGMAXID.Read(); int IMGMAXID = readIMGMAXID.GetInt32(0); //////...

Array -- Object reference not set to instance of an object.
Hi, I have declared an array, and want to fill it with data, however I am getting the error about not having an object reference set. Um, I'm not sure that I understand, I did try declaring the array as Dim theList () () as new Array, but that didn't seem to work. Dim theList()() As Array ' ** connection code ** objDR = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection) Dim i As Integer i = 0 While objDR.Read() i += 1 theList(i)(0) = objDR("CompanyName") En...

Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.
Here's the scenario I have a running code in my localhost using windows xp with microsoft visual studio .net 2003 installed. No problem running the application. But when I transfered the application to a windows server no microsoft visual studio .net 2003 installed. i encountered Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object ref...

Spidermonkey:JS_DefinePropertyWithTinyId() on array object sets array length!
I've just upgraded my embedded SpiderMonkey implementation from one dating back to early 2001 - somewhat overdue, I know! And my app has broken. My code issues JS_DefinePropertyWithTinyId() on array objects created with JS_NewArrayObject(). These calls are setting the array length to the value of the tinyid, which is most unexpected and not what used to happen with my vintage SpiderMonkey edition. Does anyone know how to prevent this? Steve Evans wrote: > I've just upgraded my embedded SpiderMonkey implementation from one dating > back to early 2001 - somewhat o...

SQL DataSource : Object Reference not set to an instance of an object
 Dear friendsI am getting this error from few days (it was not in past)when i add new "sqlDataSource" , I set the Server name, user name and password then i select the Database, when i click on "Test Connection" button, it does not give me any Error and it shows that Test connection Successful, but when i click "OK", It shows the Error box with the error "Object Reference not set to an instance of an object"From few days it is happening, I was seting the datasource without any problem in past.I am using SQL Server 2005Any one can help? aliusmankha...

Database row sets: working with ref to array-of-refs to array
Hi, Using the DBI module, I've retrieved a row set from a database. I have an $ary_ref with which to access the data. As I understand it, $ary_ref is: a reference to ... an array of references to ... fixed-length arrays containing the selected cells from each row. The SELECT statement that produced this result specified three columns to return; A, B, and C. I want to take the values of A and C from each row, concatenate them with equal-signs, surround this pair with parens, and join these with commas. e.g. (a1=c1),(a2=c2),(a3=c3) ... etc. I've been ...

[Object DataSource]
 Hi,Is it possible to binding an object source which has an inner object?If, so How can i do that. And also I want to make sort, filter and grouping  operation on that column.How can i achieve this scenario? Thanks,Prabhu P    Be Confident. Go Nxt Hi: it possible to binding an object source which has an inner object?   You can either do this in inline code or code behind. For example, in code behind (assume you're using GridView):  protected void GridView5_RowDataBound(object sender, GridViewRowEventArgs e)  &nbs...

Array processing getting (Object reference not set to instance of an object")
I have some Vb code which I an using to read (Teradata SQL) statements from a local SQL Server table into an array.  The intent is to make the array an (Application) level variable and use it everywher else in the web app. I have the code working to get the text from the SQL Server database and I'm trying to insert it into a local array.  I get the infamous "Object reference not set to instance of an object" error. Here is the code, do I have to put a value into the array for all items before I use the items?  If I set the default of the array to...

How to go through a datatable row by row and column by column
Hello, I have a dataset with a datatable and I need to insert each row from the datatable on my sql table, anyway there may be errors, so some rows may not be inserted because primary key constraints,  So I need to show the rows that are not inserted in a gridview, the hard thing to do is to go through all the datatable,  is there an wasy way to do it?MCPD ENTERPRISE APPLICATION DEVELOPER Start by looking here an update of your dataset, and if a row fails, you can mark it as invalid.You can ...

'Object Reference not set to an instance of an object' error copying array from Cache
 Hi there! I'm receiving a "Object Reference not set to an instance of an object" error when I try to copy some Cached data into an array.. Can someone please tell me what's wrong here?  Basically my main function checks if  a certain value exists in the Cache and goes one way or the other depending on the answer:    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim myData(5) As String myData = Cache("cachedData" + identifier) If myData(0) = Nothing Then ...

Datawindow retrieve rows in dev, retrieves no rows deployed
I created a datawindow in PB10 and given parameters it retrieves the appropriate rows when running from development. After deploying the application, given the exact same parameters (hard coded) the datawindow does not retrieve any rows. I have seen this once before where if we had comment lines inside of the SQL select for the DW it would not retrieve only when deployed. This time, I have no comments and can not find any reason why the exact same program would retrieve differently when run in dev as opposed to deployed. (Both being run on the same machine) Any ideas?? Is the ...

Required Column Object because of entry of another column object
How do I make a Column Object Required only if another column object has a certain filled in? For example: I have a Solution Drop down box, and ONLY if this field is not NULL, I wish to have the solution description column object required. Thanks. Put some code in the itemchanged event that, when the solution column is edited, sets the required attribute on the description column (adding it if a value is selected, removing it if the value is removed). FWIW, I color code required fields (slap me since color-blind people might not see that, but its the best way I can think of handl...

retrieving from row # to row #.
I have over 750 000 rows to retrieve from a table using a datawindow, but my system can only handle approx 30 000 rows and I would like to start from the end of the table. Is it possible to set the row numbers to retrieve? For example, start the retrieve from row 750 000 and stop at row 720 000. There must be a way. thanks, Vern what backend are you using? <Vern> wrote in message news:6BA241541AAD7F2F0063357385256C40.0063358685256C40@webforums... > I have over 750 000 rows to retrieve from a table using a datawindow, but > my system can only handle approx 30 ...

Object Session
Hi!, I have a file named cDatos.cs with the following lines:  this.usuario = System.Web.HttpContext.Current.Session["usuario"].ToString(); this.contrasena = System.Web.HttpContext.Current.Session["password"].ToString(); this.obtenerConexion(System.Web.HttpContext.Current.Session["nombrecompania"].ToString());  I call this code from another class who I instantiate from an aspx page, but I receive the following error:{"Object reference not set to an instance of an object."} Any hint on this?regards, -eduardo s.m. &nbs...

Retrieving Array From Session Object
Hi there, I'm quite new to VB.Net, and I'm running into a problem... I'm attempting to retrieve an array that it stored in a session object, to use on an button click event. The code I'm using is as follows: ----------- Dim records() As employee = CType( Session( "emps" ), employee ) ----------- emps() is a multi-dimensional array that I have declared globally in my class, which is of type "Employee" (a DLL file [class] in my project's BIN directory). It has no elements when being retrieved from the session object (I'm not sure if this could be causing th...

Web resources about - Data Set ---- Data Row ( How to retrieve column data in a array ) -

Facebook Developers Can Retrieve Users’ Profile Pictures In Different Sizes
Facebook introduced a way for developers to retrieve users’ profile pictures for use within their applications in different sizes, rather than ...

Winston retrieves the news - Flickr - Photo Sharing!
... food and losing weight. Three months ago, we were told he had lymphosarcoma of the GI tract. On March 10, 2008, Winston was called to go retrieve ...

Dolphin retrieves phone for a lady after it fell in the ocean - YouTube
Dolphin retrieves phone for a lady after it fell in the ocean

Man killed by train after jumping on tracks to retrieve something
A man has been killed by a train after jumping onto the tracks to retrieve something at Wentworthville Station.

People Are Willing To Go To Extreme Lengths To Retrieve Their Stolen Smartphones
People are willing to pay a ton of money and potentially put themselves in danger to retrieve their stolen smartphones, a new survey has found. ...

NSA surveillance program can retrieve, replay phone calls
The NSA has built a voice interception program capable of recording 100 per cent of a foreign country's calls and replaying voices from calls ...

Divers retrieve body from NSW floodwaters
A woman's body has been retrieved from a submerged car in a creek in Maitland.

Tourist plunges to death from Potts Point rooftop park trying to retrieve football: police
A French tourist who fell to his death from a rooftop park in Potts Point in inner Sydney was attempting to retrieve a football that had gone ...

Rescuers retrieve bodies after Brazilian tour bus crash kills 54
At least 54 people have been killed after a tour bus plunged hundreds of metres into a densely wooded ravine in southern Brazil, authorities ...

Investigators retrieve more human remains at MH17 crash site in eastern Ukraine but wreckage cannot yet ...
Dutch forensic experts recover further human remains at the crash site of downed flight MH17.

Resources last updated: 1/4/2016 7:55:04 AM