471,887 Members | 1,126 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to execute codes stored in a table

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 810
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 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.