473,321 Members | 1,877 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,321 software developers and data experts.

Execute VB code from a string

Hi

Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
Jan 19 '07 #1
6 1095
Killer42
8,435 Expert 8TB
Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
I'll be quote surprised if you can do that. But I could be wrong, of course.

By the way, what version of VB are you talking about?
Jan 21 '07 #2
sashi
1,754 Expert 1GB
Hi

Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
Hi there,

Correct me if i happen to be wrong, are you talking about including the extracted srting into SQL statement? Take care.
Jan 21 '07 #3
Killer42
8,435 Expert 8TB
Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.
I just had another thought about this. It might be possible to generate code (or read it from a database or file) and somehow use the Microsoft Scripting engine to execute it. Perhaps by writing it to a .VBS file and executing that.

Thoughts, anyone?
Jan 25 '07 #4
I understand that you want to do something like this
"text1.visible = False" this is stored in a string and you want to exectue the statement stored in the string. If that is the case may be this link could help.
www.thescripts.com/forum/thread15090.html
Mar 26 '07 #5
Killer42
8,435 Expert 8TB
I understand that you want to do something like this
"text1.visible = False" this is stored in a string and you want to exectue the statement stored in the string. If that is the case may be this link could help.
www.thescripts.com/forum/thread15090.html
Thanks for that link. It does sound to me like just the sort of thing that Grant was looking for. Even if it turns out not to be, I certainly found it interesting. I'll have to look at adding this to the Tips & Tricks thread at the top of the forum.
Mar 26 '07 #6
Hi

Does anyone know how to take a string (eg. read from a database field) and execute that string as vb code.

If you are talking about embedding it in a SQL statement, that's quite simple...There's no problem either if it's a pure Visual Basic code, you can a variable of type string then concatenate it with code...Of course don't forget the syntaxes of VB...
Mar 26 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Eric Wood | last post by:
We have an application that is accessed using shared drives, client executes program from server. We have already coded the program to create and save the a bat file either locally on the users...
4
by: Kartik | last post by:
Hi, I have an ASP.NET application using VB.NET.I am sending a DOS command to a machine on the network to print a file. This is achieved using xp_cmdshell Dim str As String = "xp_cmdshell...
6
by: Doohan W. | last post by:
Hi, I'm now working with DB2, and I can't find out how to execute the contents of a string Statement, without using a Java/... procedure, only using SQL statements. I know that some SQBDs such...
3
by: Lyle Fairfield | last post by:
MS-SQL Server utilities Enterprise Manager and Query Analyzer will model almost any MS-SQL object as a simple script file with a default ".sql" extension. But how to "run these files? They are...
5
by: John Grandy | last post by:
Is there any way in C# to mimic the T-SQL EXEC() command (which runs a string as if it was in-line T-SQL code) ?
4
by: Chris | last post by:
I posted this in the C# language group, then thought it might be more appropriate in this group. I would not cross-post except I want the answer so badly. I built small C# Web and Web Service...
2
by: nick | last post by:
Hi, I wondering if it is possible in asp.net to somehow execute a string of code as if it were a page on the server. That is to say, if I executed the following code which resided in an aspx...
2
by: Dune | last post by:
I'm trying to execute an aspx page by calling Server.Execute. The aspx page I'm trying to execute is in a different web app from the aspx page containing the Server.Execute statement. A slightly...
3
by: Peter Afonin | last post by:
Hello, Our SQL server used to run under System account, and I had no problems executing DTS packages from the ASP.NET: Dim oPkg As DTS.Package oPkg = CreateObject("DTS.Package")...
1
by: Eric Wood | last post by:
We have an application that is accessed using shared drives, client executes program from server. We have already coded the program to create and save the a bat file either locally on the users...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.