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


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

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 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

Database Querying Times

I ported a script I made over to SQL Server 2k from Access and went from queries that took a tenth of a second to up to 30 seconds! Typically they are between 5-10 seconds.

All I can think of is I screwed something up in the connection procedure, and here that is:

Code:
set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout=30
objConn.Open "Driver={SQL Server};" & _
"Server=ipaddress;" & _
"Address=ipaddress,1433;" & _
"Network=DBMSSOCN;" & _
"Database=databasename;" & _
"Uid=userid;" & _
"Pwd=userpass"
set recordset=server.createobject("adodb.recordset")

View Replies View Related

Multiple Drop Down Boxes Querying A Database

This is the solution needed to have Multiple Drop Down Boxes querying a Database(s) that will not wash out you other textboxes and objects on the select. Copy the code, change the connection to get you data and fly. Code:

View Replies View Related

6 Characters From The Text Field

May I know how to restrict the user to key in at least 6 characters from the text field by using asp? If possible

View Replies View Related

Text Field Characters

i have a form that has two hidden fields.The first hidden field will has a value like this 'EM12HILL.JPG'.The second hidden field has a value like this 'AA01'.What i would like to happen is when submit button is pressed, the characters in the first hidden field will change to the following 'AA01HILL.JPG', as they are passed to another form.

View Replies View Related

Show First * Characters Of A Field

I want to add articles to a database with the intention of displaying the first so many characters (like an intro) of the field on the home page. The database would be an Access db with the field holding the html for the page in question. How would I go about this?

View Replies View Related

Extract Last 4 Characters From Form Field

If someone submits a phone number in form, such as 707-433-5434, how could I get the last four digits into a variable, ie., 5434 in this case?

View Replies View Related

Access A *.dbf (foxpro) Db

I'm trying to access a *.dbf (foxpro) db from an ASP app, and it works just fine as long as it exists on the same machine as the web files exist (running in IIS 5.0). However, whenever I try to connect to a dbf file across the network on a different machine, I get this:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[Microsoft][ODBC Visual FoxPro Driver]File '******.dbf' does not exist.

View Replies View Related

Problem Using FoxPro OLE DB Connection

I am running IIS on W2kServer and am trying to use ASP with some
legacy X-Base tables. I cannot get the provider to connect.

Relevant code is:

strProvider = "Provider=vfpoledb;Data Source=C:DB2DDMS"

set objConn = server.createobject("ADODB.Connection")

objConn.Open strProvider

This style works fine with Access tables, but I get the following
error with the vfpeledb connection attempt:

An exception of type "ADODB.Connection: Provider cannot be found. It
may not be properly installed" was not handled. Code:

View Replies View Related

Updating FoxPro Index

We have Old FoxPro 2.6 based system, which usage Indexing techniq' for fast searching. As now we are developing New Web basesd system in ASP/ASP.net, the time we update the databases which Usage Index. the data dont get reflected in the FoxPro Application.

let me explain. The data updated from ASP pages can be accessed from ASP but they can not be accessed by FoxPro system without Reindexing the table in Exclusive mode.

View Replies View Related

Middle-Tier Foxpro Communicate With ASP

I have a middle-tier written using Foxpro. I'd like this tier to communicate
(that is pass some variables to ASP). I defined a Session variable somewhere
in my ASP file, e.g. Session("Usercode") = Somevalue. Now somewhere else, I
want to change this value. I tried this:
UserSession = CREATEOBJECT('ASPTypeLibrary.Session')
UserSession.Contents("Usercode") = TheUsercode
However, it gives the error: ASPTypeLibrary.Session is not found. However,
VB's object browser lists this

View Replies View Related

ASP Script To Replace Certain Characters From A Database With Another

We have a database that contains many characters and symbols we no longer want (or that we need to replace with something else). For example... We have some records in a database that contain the copyright symbol:

And we want to replace that with:

©

Our table is titled Product_Descriptions and the column we want to run this query on is ProductDescription.

I've already searched and I found this:

UPDATE <table>
SET name = REPLACE(LTRIM(RTRIM(name)), '�', '&copy;')

That should work right? But what do I enter to run this on my specific table/column? I know I have to replace the <table> from above with my own input... but can someone guide me in the right direction. I'm a noob when it's comes to SQL queries.

View Replies View Related

Re-writting For DBASE IV

I have stolen code from another thread in this forum that I am attempting to modify. The original code uses a Microsoft Access database file but I can't create one cos I don't have Microsoft Access. Instead I am using Microsoft Works to create a dBASE IV .dbf file.

This is the code i have attempted to use but it doesnt work. Code:

View Replies View Related

Dbase Remains Open

I am creating ASP pages which call for information from a database, however when I have completed the page in FP, exit, and go to Access to modify a Query, I am told the Database is still in use and that only "Shared access " is available.This does not happen if I reboot the computer.The page was generated by Access "HTML Wizard.I am using FP98 and W98.

View Replies View Related

Insterting Quotes Into A Dbase

How can you insert a quote ' or " into a database from a forum without getting an sql error due to the quotes closing, or opening a new field in the sql string.

View Replies View Related

Dbase And HTML Sorting

I have a Parks Database where anyone can see a complete list of parks we have. What I would like is for people to be able to sort this list by certain parameters, one of them being a "District" parameter, but could conceivably be parameters such as Sort By "Playground" to see a list of Parks with Playgrounds.

Is there a way for me to do this via some sort of hyperlink to the "District", that if it's clicked on, does a new form (Maybe a form named sortViaDistrict) within the same page? I'm not too sure how to do something like this. Code:

View Replies View Related

ASP: Update Multiple Dbase Rows?

I've got a little user poll system and I'm trying to create an 'edit' form. The form relates to 2 database tables, one holds the poll details (title, start date, end date, etc) and the other holds the answers/options (answer_id, answer, etc). I've successfully setup the form so it updates the poll details but I can't work out how to update the answers? Code:

View Replies View Related

Export Dbase To An Excel File

It will export a database (Access) table to an Excel sheet.

Set rsC = Server.CreateObject("ADODB.Recordset")
rsC.Open "select * from CFL WHERE Emp_no = '"&empno&"'",myConn,1,3

'**** create excel file

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=CFL.xls" .......

my script is working properly but i want to create another sheet of the Excel file because i will export multiple tables from the dtabase to an Excel file with multiple sheets. it only creates one sheet?

View Replies View Related

Read/write DBase IV Files

I've got to learn how to read/write dBase IV files fast. Please provide a good quick start / tutorial and / or some good links here.

View Replies View Related

Inserting Strings Into An Mssql Dbase

The scenario is that the user enters a description of a special offer into a text box and then can add that record to a database field using the insert method of asp. However, an error occurs if the description has any apostrophes in. For example,

special offer 1: andy's prize plums
could cause an error because the insert looks something like this

"insert into offersTable(offerDescription) values (' " & request.form("description") & "'"

is there some way to escape all naughty characters so they don't cause a problem. Any suggestions very welcome.

View Replies View Related

Duplicating Dbase Entries In Seperate Dbases

I have a dbase containing login details for 21,000 members. I also have a
forum that I am about to implement.

When the user gets to the main site, he has to login (this is done by
checking his credentials against DB1) When he is logged in, all his details
are stored in session variables. Clicking on the forum link will take him to
the forum where he has to log-in or register. Currently, the forum checks
cookies to see if there is a valid name and password and then checks these
against it's own DB (herein called DB2) or requires the user to
login/register

I plan to modify the forum so that the login is bypassed and the forum
accepts the current session name and password as the login. (This is so that
all names on the site main site, chat, forum etc are uniform, i.e Dave47 in
a chat room, is Dave47 in the forum, is Dave47 in the members area etc)

so...what I need to do (if you're still with me) is.

When a new user registers on the main site, his details are put into DB1
*and* DB2. , can I have two data sources open at once?

The reason I need two DBs is that the information in DB1 is a lot less than
is needed by the forum in DB2.

Also how can I copy selected fields from DB1 (name, password for existing
users) into DB2? like I said..there's 21,000 and to do it manually would
take forever.

View Replies View Related

Storing Complete Dbase Conn In Application Object

I am currently working on a small asp application. Now I would like to store the complete database connection in the application object. Note I want to store the connection NOT the connectionstring. For that purpose I wrote a small asp include which connects to the dbase and stores the connection object to the application object. However when I use this include in my pages then it doesnt work. What I am doing wrong? Here is the code:

View Replies View Related

Field In A Database

I'm trying to upload the entire field for every recordset to &nbsp;. How could I do this? Here's what I got so far.

<!--#include file="searchconn.asp"-->
<%
UPDATE SearchTable SET SearchTable.newscontent = "&nbsp;";
%>

View Replies View Related

Access Database Field Name

I have an access database with year designations for field names, such 2005 2004 2003 ... and data corresponding thereto. I can formulate a query in MSAccess and it works just fine. However, I am trying to create a web page that will create a database
connection and use SQL to create a recordset(s) which I can then manipulate in vbScript.

The problem seems to be structuring a query that will work in
vbScript. I have tried several combinations:

rs2.Open "SELECT 2005,2004,2003 FROM Table", conn, adOpenStatic, adLockOptimistic
rs2.Open "SELECT '2005','2004','2003' FROM Table", conn, adOpenStatic, adLockOptimistic
rs2.Open "SELECT "2005","2004","2003" FROM Table", conn, adOpenStatic, adLockOptimistic

but none of these will extract data.

I have also tried casting these numbers to strings in a string variable, but still no success.

Is there some naming convention I am violating by simply using year designations as field names or is there a problem with vbScript?

View Replies View Related

Database Field Types

I pass a table name into my program dynamically. I could display the data by looping through the object.Fields for both the field name and the field data using object.GetRows.
What I have not figured out is if there is a way to figure out from the Fields what type of field (ie. Numeric, Text) it is.
Certainly I could check the actual data once it is read, but is there a way to figure out the field type without doing that? Perhaps an object property of a recordset that I am not familiar with?

View Replies View Related

Ref Database Field Name With Variable

I have an asp page that has a function that connects to an Access database.
I am using Javascript. Is there any way to reference the field name in the
database through a variable in a sql statement? Code:

View Replies View Related

Database Field Names

I have a "csv file" as a database.

The 1st row contains the field names:

Orion.Accounts.AccountName,Orion.Accounts.Address1

the code I use normally works:
<%=rs("Orion.Accounts.AccountName")%>

Although in this case is doesn't because the fieldnames contain full stops.

how to modify this line:
<%=rs("Orion.Accounts.AccountName")%>

View Replies View Related

ASP If Database Field Blank - Do Nothing!

what i am trying to do is when the database field is empty to not display the box (table) that is in my css file, whereas when there's something in the field i would like the box to display!!! So i'm basically trying to get a 'when field empy, do nothing!!! my code at present generates the box no matter whether the field is full or not!!! Code:

View Replies View Related

Update A Field In A Database

I'm having a spot of trouble trying to update fields in a access database using asp. I can delete and add fields thru the asp page but when i attempt to modify the fields i get a page not found error message. Code:

View Replies View Related

Increasing The Value Of A Database Field

im trying to increase the value of an id key in my database by 1 each time i add a new record. is ther anyway i can do it using ASP?

View Replies View Related







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