Problem In Querying A Data Field

I'm trying to select all the records of a Database that have the value of the "giorno" ( giorno = day in english.. i'm italian) field bigger than today.... but there's something wrong in my query. The date is in the format dd/mm/yyyy Code:

View Replies


ADVERTISEMENT

Querying A DateTime Field In An SQL DB Using ASP

I have a small (still) SQL database, which I am trying to query from an ASP
page.

The field I am querying is of DATETIME data type, and is populated
automatically using the GetDate() function as a default value.

When I try and search on this field, using a date/time in the format
dd/mm/yyyy hh:mm:ss as the search criteria, it fails with the following
error:

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data
type to a datetime data type resulted in an out-of-range datetime value.

Can anyone tell me why this is? Surely if I am passing a value in the
correct format for the data stored in the field it should work? Or am I
missing something.

View Replies View Related

Querying More Than 255 Characters From FoxPro/DBase Database Field

I've been tasked with integrating an older management system based on
DBF files with my snappy new ASP application to provide users of the
ASP application with real-time data from the management system.

I figure with DBF files, I should use either the DBase drivers or the
FoxPro drivers to connect to the database. Code:

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

Display Data From Field

I tried to Display data from field DB (mysql) into a Textarea to edit the text. The code I used is : Code:

<textarea name="warranty" cols="90" rows="6" class="style55" value="<%=WARRANTY%>" type="text"></textarea>

And it does not displays the data.?

View Replies View Related

Inserting Data Into Bit Field In An Sql Database

I have an ASP variable called IRNvar:

If IRNvar(0,num) = "True" then
IRNvar(0,num) = 1
else
IRNvar(0,num) = 0
end if

In my sql database I have a True/False field called VariantFlag which is a bit data type. The IRNvar value is numeric. I am trying to insert the 1 or 0 into the database so that the field shows true or false accordingly but I get a 'Type Mismatch' error. Here's the insert statement:

SQL = "INSERT INTO Documents (CNID, DocumentPrefix, DocCategory, DocumentName, VariantFlag, PartNo, PartDesc, NewIssue, StatusID) VALUES ('" & CNID & "', '" & IRNprefix & "', '" & IRNcat & "', '" & IRNnumber & "', " & IRNvar & ", '" & PartNum & "', '" & IRNDesc(0,num) & "', 'A', '5')"

Is there a way to convert the number to the right data type? Am I doing something wrong? I'm quite new to all this so it's probably something silly.

View Replies View Related

Get Data From A Form With Different Field Names

I am designing a shopping site, in the picture the #1 section is a check box behind product name that customer can select that product to buy in #2 section the customer can set quantity of the selected product ok now codes this is the code which I have used to pull out produts and categoris from database and show them on the page Code:

View Replies View Related

Compare Field Data To Entire DB

I have a page that adds data to an Access DB. When an employee adds a record I want to compare the phone number from the data they inputted to all of the phone numbers that are currently in the database for that field.

If the new phone number currently matches any record in the DB I want to have an alert that notifies the employee that a record with that phone number exists with the date that the first record was inputted and ask whether they want to continue and add the the new record or cancel the addition of the new record. Otherwise, I want the data to just be added. At this point I have a Case statement that will add the record after a submit button click.

View Replies View Related

Automatically Enter Data Into A Field

i am trying to create a html form which you can enter the course data into the form and it will add it to the database, but i want the form so when you select the course name from the dropdown box it automatically finds the id from a different table which the id is specified as an autonumber. the tables i have are courses_data with all the data in and course_title which hold the course titles and thier unique ids.

View Replies View Related

Form Field Data From Database

I currently have a web page that pulls in job vacancies from a search form all written in asp and the database is in access. I will be placing an extra field which will say "apply now" and on selecting this you will be taken to a new page where you can fill in your details and email them to the employer.

My problem is I need to know how to get a field in the form that will automatically fill in the title of the vacancy being applied for from the database.

View Replies View Related

Remove Quotes From Field Data

I'm trying to pass a hidden parameter from a form and when the data contains a (') or ("), it bombs. How can I remove the quotes if they exist in the data before passing the parameter?

View Replies View Related

Send Data From A Combo Box To A Text Field

I use dreamweaver and i have a combobox named country and a text field named email. I want the user choose a country from the combobox and the email for this country go to a text field. Lets say the user choose England from the combobox and an email will be puted in text box. I use PHP or ASP. This is my form:

<td><select name="country" id="country">
<option>1</option>
<option>2</option> </select>

<input name="email" type="text" id="email" value="email for the country in combo box"> </td>

View Replies View Related

Hyper Link Data Field Problem

I have a hyper link field in access 2003. when I present the information in my form(after retrieving it from a recordset) the link appears like this:

c#http://c#

even though the actual field in the database contains only the letter "c". this is the same for every value I insert in the field..

View Replies View Related

Updating Data In One Field In A Table Into Two Fields In Another

What i am trying to do is Update data in a table with data in another table but i want to update 2 fields in the destination table with data from 1 field in another table.

These are the table i have and their fields:

*CUPFirstRound* - Table1
GameId
GameDate
Home
Away
HomeScore
AwayScore
Winner

There are 8 rows in this table, thereofre the GameID's go from 1 to 8 Code:

View Replies View Related

List Field Data In Alaphabetical Columns

i have field company_name and what im trying to do is

A
Abrahams Company Alexs company AZ''x Company
Adams company Adrians Company

B

Bills company
Bobs Compay

I want the names spread over 3 columns and by alphebet category. can yous ee by the example what i mean? and is this easy to achieve?

View Replies View Related

Showing Only Part Of Data In Dynamic Field

I have an asp page that shows dynamic data from the db, I only want to show
the first 3 letters / digits from the db on the ASP page.

View Replies View Related

Searching Where Form Variable Equals Data Field

I get a "data type mismatch error". I assume it is because this is a number, but I don't know what to change.

<%
dim cnStr
dim rcSet
dim frmSSN
dim sqlStr

'store form input into variables
frmSSN = Request.Form("SSN")

'create connection and recordset objects
Set cnStr = Server.CreateObject("ADODB.Connection")
Set rcSet = Server.CreateObject("ADODB.Recordset")

' defining database connection (connectionstring2.inc)
cnStr.ConnectionString = path
cnStr.Provider = provider
cnStr.open
%>

<%
SQL_query = "SELECT * FROM Orders WHERE Driver = '" & frmSSN & "'"
Set RS = cnStr.Execute(SQL_query)
WHILE NOT RS.EOF
%>

View Replies View Related

Seperating Data From Single Table Field (string)

I need a way of putting say 10 to 20 bullet points in one table field in an
Access database

- say seperate them with a special character, then build a bulletted list on
my page.

If I can get the page to detect each special character, insert a new bullet
and move on to the next occurance in the string... Code:

View Replies View Related

Write Data From A Database Field Into A Text File On The Server

Is there away to write data from a database field into a text file on the server.

The data would be more than one line.....

View Replies View Related

Problem With An .asp Page Displaying Data Based On A Form Field Value.

I have an asp page that displays informaton from an Access database. I want to create a form that allows users to display only data that matches their search criteria.

I have made many forms like this in Front Page with the Database results wizard, but I want to manually code it. Code:

View Replies View Related

Doesnt Display Char Type Data Field Length 1

I have one field char type data length 1.. It has data either 1 or 2 in all the field tht I have checked through enterprise manager.

I'm running query:

"select * from table" and fetching all the records and displaying...

It display all the data except data from this field..Doesnt display anything..

I had put Response.write rs("fieldname")

What could be the problem?

View Replies View Related

SQL/ASP Querying

I created an ordering system using DMWMX 2004, and Access DB. On one page I have an insert form and below a display table that shows their orders and calculates dynamically the value of those orders.

As is right now, the display table show orders for 7 days, but It doesn't discriminate what 7 days. I want to be able to display only orders from monday to Sunday until 5pm.

View Replies View Related

ADO Streams And Binary Data Held In A MySQL Database Blob Field

Has anyone else found a memory leak using ADO streams to access binary data held in a database. I have searched through this forum and have not come across anyone else, so maybe it is just me.

The scenario is as follows:
Windows 2000 SP3
MDAC 2.7 SP1
IIS5
MySQL 3.23
MyODBC 2.50

If I query the database and do a response.binarywrite everything works fine and no memory leak. eg. response.binarywrite myrecordset("blobfield")

If I read the very same BLOB field into a ADOstream I then get a memory leak in DLLHOST.EXE of how big that binary field was. ie If the picture is 140k in size DLLHOST.EXE increases its memory size by 140k.

This keeps on happening until DLLHOST.EXE is something like 250 MBytes in size at which point it stops working. Quick restart of the IIS Web service and I get all my memory back.

The command I am using to get the data into the ADOstream is picturestream.write myrecordset("blobfield")

I have also tried putting the binary data into a variable first before inserting it into the stream:
set x=myrecordset("blobfield")
picturestream.write x

The stream is closed and set to nothing at the end of processing. Everything is cleanly shut down. Through testing I know the memory leak occurs once the data has been written into the stream. The stream is correctly created as type binary.

The stream problem I am encountering does not seem to be limited to ASP, I tried it using Visual Basic to create a COM component to do the same job and still got a memory leak.

So the questions are:
1. Has anyone come across this before or fixed it?
2. Is there another way of getting binary data out of MySQL, something like the opposite of LoadFile?

I have wasted so much time on this problem but cannot find, having searched Microsoft's knowledge base and the rest of the web, any reference to the problem.

View Replies View Related

Querying The First Record

how to locate the first record...i sorted the numbers and i want to display the first record based from the query...

View Replies View Related

Querying 2 Tables

I have a database with 2 tables in it.

Each table contains the fields: ID(autonumber),Title, Artist, Description, DiscNo, and TrackNo. The second of the two contains an additional field: Price.

How would I make an asp page in which a person enters DiscNo and Price into a form and the code would read all the fields of that record from table1 and then add those and the Price into table2?

View Replies View Related

Querying A Recordset?

I have a recordset that pulls a list of products that a customer has purchased within the past year to date.

Now I need to sum up the total quantity by month that the customer purchased during that time period and dump all of that info into an html table. I am wondering if it's possible to query the first recordset instead of creating a new nested recordset.

View Replies View Related

Querying From Two Databases?

Given if tables A and B are in the same database, writing a query for them is relatively easy. But what if tables A and B are in different databases? Is it possible to query them together? If so, can anyone provide a generic example?

View Replies View Related

Querying Sql Server

I'm having trouble retrieving one field from a table. Bascially i have two asp pages. On one u select a company field this then loads another page that finds the company details and posts it back to the first page etc.

Problem: The address field has line returns in it. When there aren't line returns it works perfectly otherwise it comes back with 'unterminated string error'.

In query analyzer my query works and i can use replace or update statements to remove
them in query analyzer however when i try that in an asp page it doesn't work.

View Replies View Related

VBasic Text Field (phone Number) Calculating Data Before Inserting Into Access

I have a text field in a web page I am working on that seems to be calculating phone numbers before inserting them into an Access database. i.e., 867-5309 will result as -4442 in the Access text field. My guess is that the webserver or client is processing it before inserting it. Is there any way to stop this other than using a validation script?

View Replies View Related

Querying A Database Through An Image

I'm building a path making tool, that is i have a network of paths for a park and each section of the path is its own image.

What i need to do is, when a certain piece of the path is clicked, it querys my path database and returns the information for that section of the path to a table.

Im designing in ASP VBscript and database is connected n all but im a beginner, is it feasable?

As well as this i need to be able to add to the table each time a piece of path is clicked, and also take away, like a stack.

AND aswell as this i need a seperate table which adds up the length of all the paths selected (length is in the database).

View Replies View Related

Only Querying Once, Passing Arrays

just wondering if this is possible. i have a page where option boxes are dynamically generated. each time they change the form is submitted, so that it can populate another option box.

these are both database driven, and i was hoping that i could query the information from the database first and then load that into an array/record source. my next task would be to have that array/record source be passed once the page is submitted so that i can use the information again without re-querying the database. (its an efficiency thing) is that even possible? if not what other options do i have?

View Replies View Related

Querying Multiple Tables

I want to query multiple tables (all with exactly the same field names) and then display the records returned in date order.

I've written the SQL to query all the tables (they start with the same name, but end with sequential numbers), but it's returning no records when I know there should be some. Any ideas? Code:

View Replies View Related

Joining/querying 2 Recordsets?

I�ve got 2 recordsets, 1 called �special� and the other called �A55�

Special has a field called �Email_Address��.

A55� also has a field called �Email_Address��.

What I need to do is display all of the records in the recordset �A55� but only the records where the email address field is in the "special" recordset I am using ASP so is the solutions ASP or SQL and how is it done..

View Replies View Related







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