Db Field

Using asp and mysql, can a text field in the db have a record with asp code in it and then display correctly on an asp page?

My experience is that it does not show anything in the <% %> tags but it shows the asp code when you view source. My coworker wants to make our website database driven and this text field was going to be the page content with html and <% if then else %> statements.

This does not work with php either so is there another field type that will parse server side scripting?

View Replies


ADVERTISEMENT

LEFT JOIN On A Date Field And A Numerical Field - Using WHERE Clause

I am using a Relational database for my site and i have the following tables:

FIXTURES, GAMEDATES

the fields in FIXTURES are:

GameDate
Home
Away

(All of the above are numerical fields)

the fields in GAMEDATES are:

DateID(integer)
GameDate(#Date Field#)

What i have done is in the GAMEDATE field in the FIXTURES table i have used the ID number of the date that i wish to assign to that record - using a LEFT JOIN to display the actual date that is pulled from the GAMEDATES table (That which corresponds to the relevant id used in Fixtures)

The problem is that in some of my code i want to display records using sql and sometimes in the where clause i use the following:

WHERE Fixtures.GameDate<=(Date())

obviously meaning WHERE GAMEDATE is LESS THAN or EQUAL to TODAY.

The thing is when i use the join it does not use the where clause and displays all of the records in the FIXTURES table.

Does any one know how to get around this, i have not received any error messages it just isnt displaying the right data

View Replies View Related

Comparing Field Data From Previous Field

Im comparing values in a field while doing a loop if sAct<>myData(5,i) then At the end of the loop I make the value of sAct equal the current myData

This will work when comparing other fields withing my recordset (so I know the statement works) but it will not work for the field I want to compare. The only difference with this field is that it has null values. Could this be the problem? if so, how do I deal with nulls?

View Replies View Related

Fill Field Based On Another Field

I have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.

I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.

I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).

View Replies View Related

Pass Hidden Form Field Value To Another Form Field To Insert In Db

I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.

(The hidden value (1 for example) would then automatically get passed to the
other input field.)

The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:

View Replies View Related

How Can I Change One Line Input Field Into Larger Input Field

I have being working with making an edit field over the past few days. The edit function is now working fine. The edit fields that i have are for id, subject, notes, timedate.

All of the edit screens are one line text screens. What I want to do now is increase the size of the notes box to a larger textarea type box to make it easier to edit notes. The notes field in the db is a textarea field. Code:

View Replies View Related

Automated "state" Field From "Country" Field

When you select the "Country" field in a Hotmail "get new account" link, the field "State" changes automatically, giving you the correct States that belongs to the chosen Country.

View Replies View Related

Request.Form("Field Name") Versus Request.QueryString("Field Name")

I want to know what's the differences between

Request.Form("Field Name") and
Request.QueryString("Field Name")

OR they function exactly the same, which is to return the value of the
field??

View Replies View Related

Field Value

I would like to capture an entered value and use it in a query (Access)

Part No. __________

Do I need to store it in a variable and then can I have the query come up on the same page - they would enter a value and click a submit button. I'm not sure that I am on the right path. I'm not sure what syntax to use. Code:

View Replies View Related

DB Field

What is the correct code to use to hide a section if a specific DB field is
NULL.

View Replies View Related

Bit Field

I'm trying to select all records that are true.

Code:

activerecord = -1
strsql = "select cnum from [topline data] where cnum = '" & cnum & "' and activerecord = '"& activerecord & "'"

is that right?i get this error when it equals 0. Microsoft OLE DB Provider for SQL Server error '80040e07'

View Replies View Related

DB Field Contains XML

In our ticketing system database, some fields may possible contain XML. To display a field for example, I have always used: Code:

<%=(rs_tkts.Fields.Item("CloseDesc").Value)%>

but this does not display the xml code listed. what I should do?

View Replies View Related

Add Field

Im wondering if there is any way to add a field into an MS access Table using SQL/ASP..

The reason im asking is my database online is Access 2000 (which i have at home), and im in work and they use Access 97.. so i cant download the database, add an extra field into the table, and then re-upload..

Ive tried using a Make Table, Update, Append.. but it doesnt like any of them statements..

View Replies View Related

Append Field

I need to append a field to a dbase file as part of a web application using asp/ado. I'm trying

Set oRS = Server.CreateObject( "ADODB.Recordset" )

'ors.CursorLocation = adUseClient
'ors.CursorType = adOpenDynamic

ors.Fields.Append "Index", adChar, 255 , adFldIsNullable

The problem is that the routine runs fine with no errors but the field is not added. Can someone help me out?

View Replies View Related

When The Field Is Null

I have a condition that will run depending if a field in the database is NULL. It will not run at all, and I tried various way to write it but none works so far

'not working
If assignee = DBNull Then

'not working
If assignee = null Then

'not working
If assignee = "" Then

If I write assignee to the page then the value of assignee will write if it has a value and nothing if it is null.

View Replies View Related

Move To Next Field

i have a page that calls images from a database, that is 3 images a page but in my database i have more pictures for one record, so i want to have something like a link that will call the next field that has an image and i want it to replace the ones that i already have.

View Replies View Related

How Can I Get The 5th Position Of A Field?

I'm querying a table and the column has 6 positions. I need to check if the 5th position is a 2,3,6 or 7. If so I want to set a variable = "Y". Can someone help me out with this?

View Replies View Related

How To Insert Field By SQL

How to insert fields in a table by using SQL?

View Replies View Related

Variable In The Field Name.

Usually, we can get data from table
by using rst("userid") because we know the column name
userid. Now, I have a variable to hold the column name. I
want to get data value like this rst(var1). However, I got
an error message.

View Replies View Related

OLE Object Field

I have an MS Access DB and wanting to display OLE Object(pictures) data type
of MS Access to the browser. Is there a way that I can call it from the
database?

View Replies View Related

Specific Field

I am working on a college project which has a user area and a page where only a user can access their information and no one elses.I am trying to do a select statment to read specific information from a field without reading any other users info.
The code below is for a drop down menu for payment months i have stored in a database...
Here is what i have got so far...

Code:
Set oRs = Conn.Execute("SELECT [Payment_Period] FROM wages WHERE [Staff_ID]=" & staffid" ORDER BY [fullname]")

View Replies View Related

How Do You Get The Value Of A 'File Field'?

How do you get the value of a 'File Field'?

I have a form with a few text fields and 3 'File Fields' that are used to upload images.

I need to be able to get the value of each 'File Field' into its own variable.

But you do not seem to be able to access them the way you do with normal form fields.

View Replies View Related

Text Field

How i can get a text field that would accept apostrophes?

here's my code:

Title = Replace(Request.form("AddTitle")
Message = Replace(Request.form("AddMessage")
Author = request.Form("AddAuthor")
TimePosted = request.Form("AddTimePosted")
DatePosted = request.Form("AddDatePosted")
sql="INSERT into NEWS (title, message, author, date_posted, time_posted) "
sql = sql & "VALUES ('" & Title & "', '" & Message & "', '" & Author & "', '" & DatePosted & "', '" & TimePosted & "') "
Conn.execute(sql)
Response.write sql

View Replies View Related

Field Calculation SQL

would like to calculate field based on the entry in another i.e.;

field3 = field2 X field1

field1 field2 field3
10 2.5 25.00( =sum(field1*field2))

How do I go about this in the SQL DB itself, can it be done within field3?

View Replies View Related

Getting Id Field After Rs.update

this is a problem that is cropping up for the other developer here and i can't seem to find anything wrong. this code has worked for months and then the last couple of days it started sporadically not working. i'm thinking that it has to do with a performance issue but i'm not sure.

i don't use the ado .addnew or .update, so i'm a bit unfamiliar with the workings of it. here is a brief overview of the code.

ordRs.AddNew
... do the field updates
ordRs.Update
order = cint(ordRS.fields("order_id")

the problem is that order sometimes ends up as null, it's not getting the order_id field after the update. like is said, it's sporadic. anyone have any thoughts here?

View Replies View Related

Rating Field

In a table I have an unlimited number of items - each unique item has it's own unique ID. One of the fields in the table is a Rating field. The table stores records submitted by users for items that they Rate (on a scale of 1 - 5, with values of 10,20,30,40 or 50 inserted in the db). I would like to sort this info and display the five most favorite items among users via the rating scale. In other words the five unique items that have been rated 50 (best) most often.
I'm able to create a record set of all unique items that carry a 50 rating using the statement:
strRated="Select DISTINCT RList.BID FROM RLIST where RList.Rating=50". How do I then use this record set to find the ID's of the five items that are rated most often with the 50 rating and then display those?
Originally, I thought I could use the values 10,20,30,40 or 50 to calculate an average or a total among these records and then display the items with the hightest calculation. At least that was the intention - though I do not know exacly how to accomplish this either.

View Replies View Related

Text Field!

i am using ASP with recordset I am using nvarchar field and TEXT field in ms sql server
i update it as follows

rs("thenvarcharfield") = request.form("somedata")
rs("thetextfield") = request.form("someotherdata")
rs.Update

at one page it works fine and when i use the same kind of code to update another TEXT field it doesn't update and the I.E. loading bar increases very slowly and the next page never loads someone suggested to use .appendchunk i used rs.appendchunk and i got the error "object doesn't support this property or method" he also said that .appendchunk cannot be used to update nvarchar.

i removed the code to update TEXT field and the page loaded as expected (normally)!
Why one text field worked fine while the other didn't?

View Replies View Related

Access Field

I am developing guestbook using ASP and access. problem is access fields holds max 255 characters. Is there anyway I can create 2 message fields so when first one is full it uses second field. Apart from above any other ideas will be useful. Do you think it's good idea to use notepad to store msgs.

View Replies View Related

Sertin Field

How do you code so it only displays the first few words of Filed (description)

View Replies View Related

Certain Field Empty

i want to count all the records in my database where a certain field is empty.

heres my statement:
"SELECT Count(*) As Total FROM table WHERE field1='value' AND field2=' ' "

gives an error.
If it not possible. can the next be done:
1 count all the records.
2 count the records where field2='Yes'
3 subtract the two to get where field 2 is empty?

i know it's just something small, but i can't seem to figure it out. i also tried field2 != 'Yes'

View Replies View Related

Field Relationships

I'm trying to build a sort of datagrid control by which i wish to
edit/delete/update data in a table.
Since I'm using foreign-keys for normalizing data in the db I need, when I
add or update data, to display those foreign-keys ID in a user-friendly
manner such as a combobox with values = FK and visible text = Value of the
description field in the related table. Is it enough clear 'till this point?
So I need to detect if a field in a table is related to another field in
another table (i seldom use self-joins, so maybe that would be a limit of my
control but I don't care about that).
Do I have to refer to the Recordset's object OpenSchema method or there's a
better/simpler way to do it?
OT P.S (Off-topic post scriptum.Do you have any suggestions or
advices on companies that work with MS technologies and might be interested
in an ASP/MS Access (included all MS Access non database specific stuff such
as Forms, VBA, Reports) developer with 2 years experience.

View Replies View Related

Update Field

ive got a table filled by a recordset with a column named "STATUS"
each record is a sale transaction. the status of this transaction is either open or closed. right now the table displays whats in the database as is, but i want to add the functionality to be able to close a transaction from the table.
i was thinking of 2 methods, one would be a check to see if the field = open, and if it is, make that field a link to a small popup that verifies the user wants to close the transaction then does its lil sql thing aand updates the table.
the other way i was thinking was to check if its open and make it a drop down list that will update table when submitted.
im veering more toward the former idea(not a fan of drop downs)

View Replies View Related

Searching A Field

I have a database which has a field called "title". I have made a text input box and set that user submitted text to a variable (call it textvar). How do I say something like this...?

Set rs = conn.execute("Select * from workitem where title contains '" &textvar& "' " )

Of course the word contains is just a guess on my part.. other ideas are "is like". What function/syntax will give me what I want, which is for it to return any title that has the words entered by the user?

View Replies View Related







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