How To Include The Variable In The "select" Line..

first I typed this:

p=Request.QueryString("num")

then I typed this:

sqlstring = "select column1 from table where column2 like '%p%'"

it find nothing. anyway, if I replace the "p" in the second line to what it was equal, it does find what I need.

moreover, when I print "p" I get the right string.

View Replies


ADVERTISEMENT

Select Line

I am having some problems width a little script i downloaded. I'm not able to figure out what he SELECT line does. What does the @@identity mean?Is this maby a javascript?

function GetLastIdentity(ADOConnection)
{
var rstIdentity = Server.CreateObject("ADODB.Recordset");
rstIdentity.Open("SELECT @@identity AS IdentityId", ADOConnection);
var iIdentity = rstIdentity.EOF == false ? rstIdentity("IdentityId").value : -1;
rstIdentity.Close();
return iIdentity;
}

View Replies View Related

Include A Line In .HTML File

is it possible to include a line of asp in a .html file?

View Replies View Related

Adding Variable To Query Line

The form post an agent name to the next page it then takes that name and matches it to the database and shows all entries that agent has. my problem is with calling the variable in the query I just cant seem to get the syntax right Code:

View Replies View Related

Variable Asp Include

is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that reading the file using "Response.Write FSO.OpenTextFile(ppp, 1, False, False).readall" prints the file, and treating it like a html file.

View Replies View Related

Include A Variable

I'm trying to include a variable in the <!--#include file='db.asp'--> stament?

View Replies View Related

Variable In Include File

It is possible to add variable into the include file.

<!--#include file="../info/<%=strfoldername%>/notetosomeone.asp"-->

strfoldername is from my database. It doesn't work. Anyone knows how to solve this problem. Or has other way to do it.

View Replies View Related

#INCLUDE FILE= Variable

is it in any way possible to include a file specified by a variable name?

View Replies View Related

Passing A Variable To Use An Include

I am trying to write a little script using includes ... but I am getting errors, I am passing a URL variable to use an include.

<!--#INCLUDE VIRTUAL=Request.QueryString("path")-->

Am I missing something?

View Replies View Related

Set Variable To Include Page

im trying to make a string and in that string have an include in to include a .asp page is this possible. Code:

myhtml = ""
myhtml = myhtml & "This Should Work "
myhtml = myhtml & " <!--#include file ="TESTR.asp"--> "

View Replies View Related

Pass Variable Into Include

Is it possible to pass a variable into an include statement?

I have a link as follows:
http://mywebsite/page.asp?project=tsc

My page.asp has three include statements.

<!--#include virtual="/nav_table.asp"-->
<!--#include virtual="/directory/project.asp"-->
<!--#include virtual="/menu.asp"-->

I'm hoping to replace "directory" with the variable in the link so that I get:

<!--#include virtual="/tsc/project.asp"-->

How does one get the variable in to the line above?

View Replies View Related

Feed Variable Into Include Statement

i'm trying to change the following include statement :

<div id="contents">
<!-- #include file="includes/main_page.asp" -->
</div>

on an ASP page into something that receives the file name as a variable :

<div id="contents">
<!-- #include file="<%=fileToInclude%>" -->
</div>

however, this doesn't seem to work, as i get the following error message :

The include file '<%=fileToInclude%>' was not found.

it obviously is trying to find a file named <%=fileToInclude%> instead of seeing the variable my question is : is it possible to feed a variable into an include statement ?
if yes, how should i go about it ? if not, are there any alternatives ?

View Replies View Related

Insert A Variable Value In An INCLUDE Fiel

Any ideas how to make the 'htm1.asp' a variable name?

Say at one time we want to use 'htm1.asp' and another
time we want to use 'htm2.asp' as the include file.

Any ideas?

View Replies View Related

Inserting A Querystring Variable Into <!--include-->

activelang=Request.QueryString("lang")
.
some code
.
Response.Write " <!--#include virtual='/SIFS/" & activelang & "/welcome.txt' -->"

activelang=Request.QueryString("lang")
.
some code
.
<!--#include virtual='/SIFS/<%= activelang %>/welcome.txt' -->

Is there any trick will do the job ?

View Replies View Related

How To Print Variable In A Include Virtual?

how to assign a variable in a page then in a file that is included write a variable to an include virtual statement that's located in the 2nd included file? I've tried this but it doesn't work Code:

View Replies View Related

Select Case Variable

I have an array made using split to create act_count variable below I am then using a select case to write names from array.. Code:

View Replies View Related

Select Distinct Variable

I m trying to use select statement in order to select a distinct word like 'c', but in the database i only want to select c when it occurs on its own not when it appears in another word.

eg i need to select the alphabet 'c' in 'the cat category is c' but not the 'c' in 'cat' or 'category'. I have used the code below but this seem to count all 'c'


select set rsTypes2 = con.execute("SELECT COUNT(two) AS total FROM march where two like '%c%'")

View Replies View Related

Accessing/Passing An Object Variable To A Server.Execute Include

I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.

I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.

Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:

View Replies View Related

Variable Arrays From Database For Select And Span

I am working on a site with MS Access and ASP that needs to have data selected from a listbox, populate several span fields. I can do it with JavaScript but the array data is hard coded, I want the data brought in dynamically from an Access database. Here is my JavaScript code:

View Replies View Related

Read Cell Data Line By Line From Excel

I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro)

Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?

View Replies View Related

Read Txt File Line By Line

I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file.

Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?

View Replies View Related

Include More Than 1 Include File

I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!

How can i get the menu page included as well as the connecting string?

Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! 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

Error Using <select></select>

I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.

The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:

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

End Of The Line

I have this textarea and I inputted this;

Quote: asp
xml
xhtml

If I update/save this to a database(msaccess) and view this in a browser it gives me a one line record like;

Quote: asp xml xhtml

but I dont want to put every end of the line a <br> tag for me not to view a one line record, how do I do this?

View Replies View Related

New Line To Br

PHP has a function called nl2br() which inserts HTML line breaks before all newlines in a string. Is there an ASP equivalent to this?

View Replies View Related

New Line

I've managed to code a function that will straightly replace some given character to another, for security of my pages. For example, I can convert (") to " and (') to ´ ..etc in the form(text field) that allow user to post some data to be stored in the db. But then I don't want the user to write it in HTML tag, and I want that when user press [Enter] on the keyboard, then I can redisplay the message in the way that the user really type in (new line). What I'm thinking is if I can replace the [ENTER] pressing to <br> to be stored in my db. But I didn't found the way I can do that.
/n such as in c++ didn't solve. Anybody knows? I use ASP VBscripts/
Does my question clear?

View Replies View Related

4 Line PHP

I have this small 4 line PHP code and I would really like this to work with ASP, can anyone dp this for me?Code:

<?php

$tempVar = 'http://www.temp.com';
$feed = file_get_contents($tempVar);
header('Content-type: text/xml');
echo $feed;

View Replies View Related

Err.line

I am trying to trap my ASP errors using the ASP error object.
Everything works almost fine, but I can't retrieve the line number where
the error occured. Here is a little piece of my code:
==========================
If Err <> 0 Then
Response.Status = "500 Internal Server Error"
Response.Expires = 0

Dim ErrorContent
ErrorContent = ErrorContent & "Description: " & Err.Description & vblf
ErrorContent = ErrorContent & "Line: " & Err.Line & vblf
ErrorContent = ErrorContent & "Number: " & Err.Number & vblf
ErrorContent = ErrorContent & "Source: " & Err.Source & vblf

View Replies View Related

Line Mean

What does this line mean?

streamFile.SaveToFile m_sUploadFolder & fileItem.FileName, 2

View Replies View Related

Next Line

in my textbody, i have several fields to send as an e-mail, but they would not fit into one row, how could put on the other line in the text body e-mails my other fields, thanks

#
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mail@mail.com"
myMail.To="mail@mail.org"
myMail.TextBody = "comment " & request.form("comment") & "; " & "city " & request.form("city")
myMail.Send
set myMail=nothing
/#

View Replies View Related







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