I found the solution.
Set a reference in your app to "Microsoft Script Control 1.0" It is under the COM tab in references. Then the code is really simple.
Dim SC As New MSScriptControl.ScriptControl
SC.Language = "VBSCRIPT"
Label1.text = Convert.ToString(SC.Eval(TextBox1.Text))...
The reason I asked is because I want to use eval() to evaluate a string. This string is an input from user.
Basically, I have a text box for user to type in a string. Then I evaluate the text in the box.
For example, user can type in:
datediff("d", now, "1/1/2006")
or...
Hi,
I did some research on this, but I couldn't find any answer.
In classic ASP, I can use eval() to evaluate a string.
For example, if I do eval(len("test")>5), it will return false. Or if I do eval(len("test") > 1 and len("test") < 5), it will return true.
Is there a function in...
Hi,
I have two SQL 2000 servers, A and B.
On server A, there is a stored procedure C.
On server B, there is a stored procedure D.
Is it possible to call D inside C??
Yeah. 100 fields is a bit much.
I use the table to store contact info. For exmaple: first name, last name, business phone #, home phone #, and .... Not all fields are required.
Hi,
I have a SQL database table with around 100 fields.
I created a search page for user to search the table. Then another page to display the search result. User can click on each record and go to another page to do the editing.
My question is for the editing page, I have to manually...
Hi,
I am new in ASP.NET.
Is there a way to get the identity ID from a SQL table after insert a record?
I have those 3 lines of code I am using to insert user into a table, and this table has a column called ID as its identity column.
Dim comm As New Odbc.OdbcCommand("insert into tbl_User...
Problem solved:
1. Create following founction.
CREATE FUNCTION GetPatID (@DocID int)
RETURNS varchar(500)
AS
BEGIN
declare @Crsvar cursor
declare @PatID int
declare @returnstr varchar(500)
set @returnstr = ''
SET @Crsvar = Cursor for SELECT PatID FROM Table2 where DocID = @DocID
OPEN...
If Access it's possible to create a simple crosstab query like this:
TRANSFORM Min(Table2.PatID) AS MinOfAMOUNT
SELECT Table2.DocID
FROM Table2
GROUP BY Table2.DocID
PIVOT [PatID];
I have a table called Table2, with 2 columns DocID and PatID:
ID DocID PatID
1 2 11
2 1 22
3 2 33
4 2 44
5 1 44...
Thank you very much for posting that link.
I already have a stored procedure very similar to the one you posted.
But what I want is just a simple query.
I guess there is no way to make it.
Thanks..
I am trying to write a query to format my data.
But if there is no easy way to do it, I will write a stored procedure and run it every hour to get the result I want.
Hopefully, there is an easy way.. =)
All I want is to create a summary view of doctors with their patient IDs.
I guess I am still used to the crosstab function in Access and don't know why SQL doesn't have this neat feature.
Anyway, in the worst case, I can write a stored procedure to create this table.
Thanks for your reply.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.