Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using Ms access to design my project,

i retrived data from database using sql query database is access, it is workinf properly.

sqlstring="select product_name,product_id from products where status=pending";

it is retriving data,

my problem is how can i divide the array and how to assign that divided value to a text box
Posted
Comments
Sergey Alexandrovich Kryukov 6-Mar-12 0:53am    
What's "divide" and why? You divide it the way you want. What's the problem?
--SA
OriginalGriff 6-Mar-12 2:43am    
You don't get "an array" back, so it is difficult to work out what exactly you are trying to do.
Try giving an example: show us a short version of your SQL table, the SQL query (which you have done) and the output you want in your textbox.
Use the "Improve question" widget to edit your question and provide better information.
janareddyjanareddy 6-Mar-12 5:53am    
I want to get the result of query into an array and split it to display value in textbox and how can i do that in vb

I think you will not be needing an array. use same query and catch the result in a datatable. If if is returning only one row with 6 columns then you can access each element as:

dTable.Rows[0][0] ....... dTable.Rows[0][5]
 
Share this answer
 
I have not gone through your requirement, but hope you can create a logic out of the below link.

How to split an array into multiple arrays[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900