473,586 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB substitution question

Not exactly asp.net, but I bet you people know this.

I used to like using command substitution in VFP where I could build a
string of VFP code and then execute it by putting a '&' in front of that
string.
Like this:

lcX = 'MyTable'
Use &lcX

In VFP the above would be equivalent to
Use MyTable

Can I do this in VB.net too? I didn't see anything in help that seemed
to apply, but I figure it must be in there somewhere. I want to have a
little code snippet in a database execute and I don't know how to
convert from a string to executable code in my application. Thanks!

Matt
Nov 19 '05 #1
2 1023
Matt,
There's really not an easy way to do this. you might want to check out:
http://www.planet-source-code.com/vb...2145&lngWId=10

or do a google search, but you won't find anything as simple as &

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"MattB" <so********@yah oo.com> wrote in message
news:32******** *****@individua l.net...
Not exactly asp.net, but I bet you people know this.

I used to like using command substitution in VFP where I could build a
string of VFP code and then execute it by putting a '&' in front of that
string.
Like this:

lcX = 'MyTable'
Use &lcX

In VFP the above would be equivalent to
Use MyTable

Can I do this in VB.net too? I didn't see anything in help that seemed
to apply, but I figure it must be in there somewhere. I want to have a
little code snippet in a database execute and I don't know how to
convert from a string to executable code in my application. Thanks!

Matt

Nov 19 '05 #2
Karl Seguin wrote:
Matt,
There's really not an easy way to do this. you might want to check out:
http://www.planet-source-code.com/vb...2145&lngWId=10

or do a google search, but you won't find anything as simple as &

Karl


I'll check it out. Thanks!

Matt
Nov 19 '05 #3

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

Similar topics

6
1951
by: Paddy | last post by:
Hi, I got tripped up on the way eval works with respect to modules and so wrote a test. It seems that a function carries around knowledge of the globals() present when it was defined. (The .func_globals attribute)? When evaluated using eval(...) the embedded globals can be overridden with
1
5140
by: Jacob Grydholt Jensen | last post by:
I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of problems with the substitution variables. My understanding was that they behave as in SQL*Plus, but my experiments beg to differ. I log on to the sample schema 'hr' and enter the following statements: -- statements begin set verify on define name = K%
2
1724
by: StopBsod | last post by:
Hi Group, I'm a newbie in XML and my problem/question should be quite simple to solve.... 1) an XML file with content like <location>file://path/to/something1</location> <location>file://path/to/something2</location> <location>file://path/to/something3</location>
1
2371
by: kollareddy | last post by:
Hi all, I am new to xml/xsd world. I want to know the differences between complex type and element being abstract and if both can be declared so, in case of substitution goups.Also can xsi:type usuage allowes in instance doucments in case of substitution goups. I tried using abstarct complex type/element with substitution groups and I attached...
4
6908
by: Don | last post by:
I think "macro substitution" is the correct term for what I want to do, but, to be sure, here is a description of what I'd like to know is possible: I want to be able to create a create an object of a type whose name is stored in a constant. For example: Const FORM_NAME_1 as String = "frmThisForm" Const FORM_NAME_2 as String =...
5
4409
by: Murali | last post by:
In Python, dictionaries can have any hashable value as a string. In particular I can say d = {} d = "Right" d = "Wrong" d = "test" In order to print "test" using % substitution I can say
4
12072
by: Ian | last post by:
Hi, Hopefully a simple question but my brain is hurting... I want to make a regex substitution, using search and replace patterns contained in variables. What I want to do is: $f = "fred.abc"; $f =~ s/(.*)\.abc/$1.def/; print "$f\n";
2
1270
by: Steve | last post by:
Hi, I'm currently teaching myself about XML schems at the same time as specifying the XML document for a project I've been given to write. (I'm new to the XML world, so progress is a little slow at the moment!) I find myself needing to restrict an element to contain either an integer in the range of 01 - 99 OR the value "*9". Because of...
11
2511
by: mailforpr | last post by:
Is this design well-formed? It contradicts the LSP and Design by contract anyhow. LSP tells us that "In class hierarchies, it should be possible to treat a specialized object as if it were a base class object." This is the design in question: //////////////////////// Two abstract data types: class Document
2
1177
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
In our application consisting of several custom user controls we want one of these controls to be excluded from the page cache. For this I tried to use the substitution control for output cache substitution. But this control renders at the top of the page before the <HTMLtag, just like using response.write. When I turn off the page cache, it...
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
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 we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.