473,379 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Executing a dynamically built statement

Is there a way to execute a statement that is built
dynamically by a .NET application.

For example I have a loop that is reading values from a
database and I want to do something like the following.

Dim stringa as string = "response.write somavalue"
Execute(stringa)

I realize this is not the best way to do this but it is
for a very specific need.

Does anyone know of a way to do something like this.

Thanks
Jul 21 '05 #1
1 1854
This can be done using CodeDom and Reflection. A few months ago a wrote an
article about how this could be accomplished. You can find it here:
http://www.microsoft.com/belux/nl/ms.../datagrid.mspx

I recommend you take a look at the code, if you have further questions,
please let me know!

Jan

"Mark" <an*******@discussions.microsoft.com> schreef in bericht
news:00****************************@phx.gbl...
Is there a way to execute a statement that is built
dynamically by a .NET application.

For example I have a loop that is reading values from a
database and I want to do something like the following.

Dim stringa as string = "response.write somavalue"
Execute(stringa)

I realize this is not the best way to do this but it is
for a very specific need.

Does anyone know of a way to do something like this.

Thanks

Jul 21 '05 #2

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

Similar topics

7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
1
by: new1s.on.sympatico.ca | last post by:
Hey There! Any one have any ideas on how to prevent the DOS window from appearing when executing an Output Assembly (exe) generated using CodeDom? Thanks, Roland
10
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void...
0
by: Billy | last post by:
I have a web page with a control (Control#A) on it. The control (#A) has a control (Control#B) on it which displays an exception message when set and displayed. I am creating a simple datagrid...
1
by: Mark | last post by:
Is there a way to execute a statement that is built dynamically by a .NET application. For example I have a loop that is reading values from a database and I want to do something like the...
1
by: agarwalshuchi | last post by:
Hi , What i exacly want to do is 1. Connect to OLAP server from my Sql server using following query string 'SELECT a.* FROM OpenRowset(''MSOLAP'',''DATASOURCE="RAPID-CHRISTUS"; Initial
2
by: Divakar | last post by:
Hi, How can we find which SQL statement is executing when "list application show detail" shows "UOW Executing" against an application. This topic was touched upon earlier by one of the member....
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.