469,159 Members | 1,392 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,159 developers. It's quick & easy.

How to execute codes stored in a table

2
Hi Friends,

I want to store a function of my Project in a Table of the Database I am using. I want to read that function and execute in Run time when needed.

Please help me.
Jan 5 '07 #1
1 781
I dont think you can do that in VB. Visual Basic is a compiled language. VBA is a scripted language. You can't run a scripted language from a compiled language without some kind of add on. If you were feeling really brave you could compile the function in C and save it out to the database in binary format. As long as it doesn't alter the stack or other registers you might be able to run it. However watch out because it wont run from the data segment which is where it will be extracted to by default.

What I'm thinking though is it might be possible with something like php. Php accepts scripts. So the idea would be to store a php script in the table in string format. Read it out in vb and send it off to php (the executable). Take php's output and do what you want with it. This would be much like shell scripting in Linux.
Jan 7 '07 #2

Post your reply

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

By using this site, you agree to our Privacy Policy and Terms of Use.