VBScript Variable

I have an ASP project where I have users select or input values into a criteria page and then once they press "Submit" the ActiveX viewer displays the crystal report. All works fine and the criteria can be somewhat dynamic because the variables are used to build a SQL statement that is passed to the crystal report as the dataset.
What I would like to do is create a variable on the Crystal report that will display the SQL statement or at least an English translation. This variable will be used to display the criteria of the report so end-users can see what criteria was used to generate the output of the report.

View Replies


ADVERTISEMENT

Make A Variable In Vbscript

I'm dividing two variables and on some instances the results going to be a long decimal. I want the decimal to round up to only one pace tho. How could I do something like that? My coding looks like this.. Code:

readscore=rsgameinfo("readerscore")/rsgameinfo("readervotes")

View Replies View Related

Variable In Flash To Vbscript

I want to pass a variable by way of a querystring (or any way that's possible) from flash (actionscript) to vbscript. From there I want to save the variable into a MySQL database. I understand the vbscript part but how would I transfer a querystring from a flash program to vbscript?

View Replies View Related

Reference VBScript Variable

This is my VBScript function:

<script language="JavaScript" type="text/JavaScript">
Dim UN
Set objNet = CreateObject("WScript.NetWork")
Set objUser = GetObject("WinNT://my domain/" & objNet.UserName )
UN = objNet.UserName & " (" & objUser.FullName & ")"
</script>

How can I reference the VBScript Variable UN in my ASP code? <%=UN%> won't work because VBScript is on the client side and ASP is on the server side. If I have to post it on one page and read it on another, how do I do that?

View Replies View Related

Accessing A VBScript Variable From JScript

I have the following code in an ASP page but it does not seem to allow a JScript to access VBScript variables. But if a VBScript accesses a variable in declared in a JScript TAG then it seems to work.

<SCRIPT LANGUAGE ="VBSCRIPT" RUNAT="SERVER"
Dim tes
test = 10
</SCRIPT><SCRIPT LANGUAGE ="JSCRIPT" RUNAT="SERVER"

Response.Write(test)

</SCRIPT>

View Replies View Related

Storing Sql Output Into A Vbscript Asp Variable Aid

I tried the search function but I can't really identify what this kind of issue would be called (Searching store variable comes back with hundreds/thousands of hits).

I am doing an update form which opens 2 SQL connections (its easier for me to do this cause I mess up joins to a significant degree, that and performance is not a big worry, eitherway).

<notes> Both connections are open, one is called rs, the other is called articlers. I have 2 databases (named database1, and database2), and I have two different SQL strings (SQL and articleSQL, the problem comes in the 2nd string and in storing a variable. Code:

View Replies View Related

Change Variable Type In VBScript


<%@ Language=VBScript %>
<%
dim a
dim b
a=11
b="11"
if a=b then
Response.Write "a=b"
end if
%>
But can't shows "a=b".How can changes variable type?

View Replies View Related

Pass A Javascript Variable To Another Page But Vbscript

I have an input box when the user clicks on the button.

var number=prompt("enter journal number");

How is it possible to pass this variable forward but to vbscript? So i could use that variable in an sql procedure?

View Replies View Related

Passing Variable From VBScript To ASP Page Using Form

I have a Function in VB Script that generates a signature. I assign the result to a variable and then need to do a hidden post to an ASP Page for further processing.

Basic functionality is I have a button upon pressing it -- It does the hidden post.

Code looks like this. Please assist with passing this stringToSign variable to the .asp page via hidden post. Code:

View Replies View Related

Launch Sqlcmd In VBScript And Save Results To Variable

I want to use vbscript to run a script multiple times and save its results to a text file. I have practically wrote this script before but only using a sql command wrote in to the script. However, this is a lengthy sql file so can not be directly entered in to the vbs script,s o I would like to run it using sqlcmd.

"SQLCMD -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1)

I have tried Googling this problem but found very little information about it. Any discussions online that I have found show no code and assume you already know how to do it.

I have found this so far:

Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("sqlcmd -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1))

But how do I get hold of the results in to some kind of variable?

View Replies View Related

Assigning A Boolean Of True Or False To VBScript Variable...

Is there a way I can assign a value of true or false to a VBScript variable? I have a function where I want to initiate a value of false: Would this work? Code:

View Replies View Related

Calling Com + Object Variable Or With Block Variable Not Set

I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:

"Object variable or With block variable not set"

My vb code look like this.....

View Replies View Related

Passing Data From Javascript Variable To Asp Variable.

is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.

View Replies View Related

Convert ASP Variable To Javascript Variable

How do I convert an ASP variable to a Javascript variable?

View Replies View Related

How Do I Put A Variable And A Non Variable In A From Statement?

sql = "SELECT * FROM & console &'news'"

I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?

View Replies View Related

Variable-variable=junk

im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message

variable math bit=
qty=request.form("oqty")-Request.form("qty")

sql =
sSQL="Update spares SET spares.location='"&request("location")&_
"',spares.machine='"&request("machine")&_
"',spares.part_desc='"&request("part_desc")&_
"',spares.part_number='"&request("part_number")&_
"',spares.qty='(" & qty & ") "&_
"',spares.min_qty='"&request("min_qty")&_
"',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id

View Replies View Related

Variable Name, Dependant On The Value Of Another Variable...

I need to assign a value to a variable, but this variable name is dependant upon another variable!! I am including the code below so you can see it, cos if not I am sure you are thinking whattt?? Code:

View Replies View Related

How To Use SSL With Asp/vbscript

the isp i'm
using has authorized ssl on my site but i dont know how to tell a
particular page that it can only be run as a secure page... Where at the
moment u can view the page as https or http.

I'm assuming i need some code to detect whether its being run as a https
and if not redirect it to https.

View Replies View Related

VBScript To ASP

I have an ASP page, on the Window_OnLoad event I use VbScript to popup an Inputbox to accept a value from the user and put it into a string called strValue. I then want to be able to go (in asp)

<%Response.Write(strValue)%[color=blue]
> - but if I do that nothing happens.[/color]

How can I access the Vbscript variable in the ASP part of the page?

View Replies View Related

Using VBscript In Asp.net?

I tried using some code examples from (URL address blocked: See forum rules) into my defualt.aspx page (in VS2005). I had some errors with this. I thought this might be cause the tutorial at w3schools.com said it was for *.asp files.

For example I had an error ("Statement cannot appear within a method body. End of method assumed) when I tried putting a SUB in the <head>. Like this

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "(URL address blocked: See forum rules)">

<html xmlns="(URL address blocked: See forum rules)" >
<head runat="server">

<%
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>

<title>Untitled Page</title>
</head>


By the way if anybody will be available to answer basic questions like this every so often throughout the day (ie: check your email or this forum every couple of hours, until midnight California time December 8), I'd be willing to pay a reasonable amount. I just need help with some of the technical details like this + finding source code

View Replies View Related

VBScript And VS.NET

I manipulate MSAgent AcitiveX object using VBScript at client side, I
met a wierd problem when I debugged my ASPX page. when msagent recognize
a phrase and fire event, my vbscript capture the event and do something,
including make the agent do some animation and speech, then open a
browser window using 'window.open "www.google.com", "Google" '. the code
works fine when I view the ASPX page with browser inside VS.NET, when
browse this page in web browser from the localhost, the agent works
fine, but the new window did open up. why?

View Replies View Related

VBScript

I have COM+ component installed on my XP. I have problem to create
instance of it inside vbscript. How can I do it? The error I get is :
ActiveX component can't create object.

View Replies View Related

Vbscript

I use vbscript in an asp file.
How can i take the last string in a variable.
For example:

abc="hello123"
newabc=???(abc)

and i only want the last string, that is "3".
means, if I do...

Response.Write newabc

The output will be : 3

View Replies View Related

ASP VBscript

I'm trying to create a simple recordset, and would like to include an and/or option. to do this i set up an option on the previous page,and then sent the selection through to the next page. i was then hoping to simply insert the variable i had created into the code so that whichever of and/or is selected is used in the code. i.e.

where and_or is the variable from the previous page.

Search.Source = "SELECT * FROM dbo.Employee_List where First_Name='"&firstname&"' '"and_or"' Last_Name='" &lastname&"'"

so basically whenever someoned chooses an option its automatically filled in at the indicated location in the code. is it possible to do this and if so what is the correct syntax for using variables within this code?the full search function will have numerous fields so i'd like to avoid using if statements.

View Replies View Related

VBSCRIPT

I'am running window server 2000 and MS frontpage on my
computer. I created ASP page with the frontpage editor.
The asp code are not running when I am trying to view the
page with my browser (Explorer 5.0). Could you please help
me

View Replies View Related

Using Vbscript

Trying to figure out how to do this (querying an access db using vbscript):

select * from comments where " & search & " = " & criteria & "

where " & criteria & " can be both a text and integer value.The above would work for " & search & " = 66 but not " & search & " = smith ?

View Replies View Related

VBScript From

I have an ASP.NET solution,and the ASPX page I have a form ,I want to copy some of the data from that form to the clipboard,I am using the below script the script works fine when I use a normal anchor tag with the onclick event,but I want to be able to use an actual asp control like the hylperlink or linkbutton.

I have tried the link button but it gives an error saying Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'.

And the hyperlink control doesn't seem to have an option for the onclick. The code is located in the .aspx not in the .vb.

View Replies View Related

C# And VBScript

I have absolutely NO knowledge about ASP. Though I've been working with PHP for almost 2 years and decided that I need to take the next step and learn some more languages both to keep me busy and to expand my skills.

Like I said...I have no knowledge or experience with this. From what I read, there are two ways of coding ASP. First using VBScript and then C#. I'm really confused, because for one, I don't know what the difference is, and secondly I'm ot sure which is the best.

I'll be primarily (if not only) be using ASP to build online applications, websites, etc.

View Replies View Related

Vbscript

a dictionary of terms with definitions, (in a database) how can i hyperlink(automatically) words within the definitions for which a definition also exists.

url structure is like this

www.site.com/glossary?word=someword

Then - in the definition of "someword" there is a word that also has a definition in the database. I'd like to auto hyperlink it to that definition. Also since the data is all coming from a database, what if one of the words to be replaced has not yet come up in the loop? (...or would it be okay since EVERYTHING should be in the recordset?

View Replies View Related

Vbscript

usually do perl and php. However, I would like to backup my databases with a microsoft sql server and sometimes a simple access database. In other words I would have a perl or php script that would insert data into a mysql database and at the same time post to a vbscript that will deal with the microsoft sql server or access database. I choose not to use perl or php to do the latter because I would like to keep every aspect according to its environment.

Almost every vbscript I've looked at is embedded in the html page. Since I intend to send via a post from a different type script - my question is can you place vbscript on the server as a stand alone? If this is possible - Where can I find references to this?

View Replies View Related

Vbscript Cannot Run

I have a problem trying to run a vbscript on my desktop. The script runs fine on other desktops. Has it got to do with any security settings in my xp? and how do i enable it?

View Replies View Related

PPT To JPG Using VBSCRIPT

i have a powerpoint file "somefile.PPT" . now MS-Powerpoint when open allows the file to be saved in JPG format .. this option is present in the SAVE AS.. option .. by this what happens is that the file is stored as an JPG image ...

is it possible to convert a given valid PPT file to JPG file without opening powerpoint and using VBSCRIPT code ...

View Replies View Related

Vbscript & Sql

i'm creating an asp page using vbscript. i create and execute a string as an SQL statement. problem:

strSQL = ..... " ' " & Date() & " ' " .......... <-- this works
strSQL = ..... " ' " & Time() & " ' " .......... <-- this does not

i get a string conversion error. i'm storing the time as the data type TIME in my SQL table.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved