Need your advise ????

G

Guest

Dear all,

I need to build a web application which collects data from an SQL server
database.
SQL server database tables fields can be dynamically created or extended
depending on my customer request and can be different customers to customers.

Ideally what I would like to build is a web application frame which covers
any request and display any data. This without rebuilding my application but
more by applying a kind of configuration which will be read from the
application.

Example 1:
Table 1 from Customer 1 contains 5 columns named "Col1" to "Col5"
Customer 1 wants to view on web page all table 1 columns data rows

Example 2
Customer 2 use same table as customer 1 with 2 extra columns named "Col6"
and "Col7"
Customer 2 wants to view on web page all records of "Col6" and "Col 7" only
from table 1

So to sumurize, with different customers application I need to self
configured data which are extracted and view on the page. This without
recompiling the initial project.

How to handle this kind of dynamic view...Do I need to have a separate
configuration file (other than Web.config) on which i could set columns to be
shown ???? (note that I do not know in advance the number of columns and
column names, they are dynamically created by my customer own application)

or any other tips

Is it something possible to dynamically configure the content of the page
view based on customer demand ? if yes how

hope I clearly explain
regards and thanks for your help

Serge
 
G

Guest

try this. Datagrid handle dynamic number of dataset column.
Dim Conn As SqlConnection = New SqlConnection("string connection")
'dynamic query based on user need
Dim Da As SqlDataAdapter = New SqlDataAdapter("Dynamic query", Conn)

Conn.Open()
Dim Ds As DataSet = New DataSet

Da.Fill(Ds)


DataGrid1.DataSource = Ds
DataGrid1.DataBind()
 
G

Guest

Thnaks , thats ok for that but what I was meaning by querry is the fact that
display data will be different.

Once again, I will read all datacolumn from the table whatever the customer
is, but then Customer 1 would like to view on the page only first 2 column
for instance and customer 2 only the last one.

How to handle that customer based web page information ?

regards
serge
 
G

Guest

You can show all the column name ( used system table to retrieve the column
name of the specific table from ur database) in a list box. ask the user to
select the column they wish to view. once user select column name
list,create a dynamic query and retrieve the result .

let me know this help.
thanks
 
G

Guest

Sounds a solution, I was thinking of that at first but then that will be an
extra round trip to the server....
Then I get an other idea
Would be better if I retrive all data from the table in a dataset, then ask
the user which columns to views and then apply a Datview object based on the
dataset to filter data
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top