Inserting Data When User Logon

I am inserting data into Access when user logs on:
..............
SQL = "INSERT INTO tblLog (fldUserName,fldTimeIn,fldSID) VALUES ('" & u & "',#" & session("Date") & "#,'" & session.SessionID & "')"
con.Execute(SQL)
.....................
in here it inserts the date :01/09/2003

But when logging out :
.............
SQL="UPDATE tblLog SET fldOffline=1,fldProper=1 WHERE fldUserName= '" & session("admin") & "' AND fldTimeIn=#" & session("date") & "# AND fldOffline=0"
con.execute(SQL)
...............
it doesn't update the record.If I eliminate the date query here,it updates there is no syntax error is there?

View Replies


ADVERTISEMENT

How To Get NT Logon User Id

I am trying the following code to retrieve the user id of the NT logon user. Code:

View Replies View Related

Active Directory :: Get The Current Logon (to AD) User Name

I need to get the current logon (to AD) user name on ASP level. Is there any ActiveX (ocx,dll) object in windows directory, which I can use? I used the nwdir.dll file to get this name from novell directory with ndap....

View Replies View Related

Inserting Into Spicific User Id Row

I am trying to use a form to update a Row by a spicific ID#.

I have 2 Forms:
Status
Comments

I want to insert into a user that is already in the database the page can call the user ID by the
Code:

<%=rs("Id")%>

command. What would the SQL Insert Command be for this?

View Replies View Related

Inserting Data

I'm wondering if it's possible to create an instance of an ADO Recordset and add values to it by ASP ??

Ex :
I have 2 arrays :
arr1 = Array(1,"allo")
arr2 = Array(2,"bonjour")

Is it possible to add these 2 arrays into a Recordset to manipulate de data more easily?
If yes, could you provide me with a little example to see the synthax, because I tried almost everything and it didn't worked at all

View Replies View Related

Before Inserting Data

I am trying to make a web-based front-end for one of our programs. I'm running into a problem. Here's a sample of one of our tables:
Code:

CaseNo ChargeCount ArrestCharge FiledCharge
123 1 13 13
123 2 14 14
199 1 03 03


The ChageCount column cannot have nulls and must be unique. is there a way when I'm adding a new charge, i can check to see if a chargecount exists? For example, if inserting a new record, it will first check if there is a chargecount, if there is not, it will make it 1. if there is a charge count, it will +1 to the existing chargecount

View Replies View Related

Error While Inserting Data

I'm currently tring to insert data into an access db using asp. I have a form which is found in a popup window and which contains the fields Name and Comment. When I click on the Submit button,I call a javascript function in order to redirect the user to the page that will save the name and comment.

However,I am having an error like this:Field 'VoicesComment.Name' cannot be a zero-length string. The problem is that the value from the previous page in the popup window is not retrieved. I have tried retrieving the name entered and the page does not return anything.
The code for the page that is supposed to save data is as follows: Code:

View Replies View Related

Data Inserting Issue

I have a website written in ASP with an MSSQL2000 backend. Recently I moved off of Windows 2000 Server running IIS5 to a Windows2003 Server running IIS6 with SP3.

I transfered my sites data over an all is peachy except I cannot add any new data through the gui. I can edit existing data and delete existing data, but adding is a no go.

View Replies View Related

Inserting Data :: The_connection_cannot_be_used_to_perform_this_operation

The code below is suppose to check to see if an order for a particular user already exist for that day. If it doesn't then it creates a new order number in the webordernum table and inserts the items requested into the weborderlist table. It the ordernum however does exist, it just adds the item to the list....

it gives me an error that reads:

The_connection_cannot_be_used_to_perform_this_oper ation._It_is_either_closed_or_invalid_in_this_cont ext Line 14 (the rs.open line)

Code: ....

View Replies View Related

Inserting Into DB When Data Contains Quotes

I have a form that inserts data into a database...wow, big surprise there, huh? Anywho, my problem is when a user types a word like can't or won't etc.. The single quote obviously throws off the SQL string.

I looked through the forums to see if anyone else had similar problems and I found one. It was suggested to use a replace method upon inserting and then reversing that when reading data from the database. Code:

View Replies View Related

Blank Data Is Inserting In Db

i am creating a dynamic protofolio page in asp. in that page admin will fill up all the fields . i am giving u the html code here Code:

View Replies View Related

Inserting Data Into Sql Server

i am trying to insert utf-8 data into ms-sql server using asp. i created an input box from where other charater (like chinese,japnese) will be inputed and should store it in sql server.and it is inserting it as some junk characters in sql server. but When i tried to display it in browser it is not displaying properly. in asp page i wrote this

session.codepage = 65001
response.charset = "utf-8"
' INserting goes here

View Replies View Related

Inserting Data From Sub Form

how can i insert data from a sub form to the fields in the parent form. I am currently to do a search from at the parent form by poping out a new form. When i got the search result, i will need to click on the selected search result and populate into the parent form fields without any refreshing process as it might reset my form.

View Replies View Related

Inserting Data/time To An Access Db

i have an access db with a "date/time" data type with a format of "Long format";
i want to add the date/time automatically in DB when a user submit a form.

i tried using the
xdate = formatdatetime("var",1)

and putting that var in the DB, but i get an error

can someone show me how to do it right?

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

Inserting Data Into A Database Table

i am trying to use the 'Insert into' sql query to insert data in an asp file but having some errors...this is the eror i got from the browser..

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/AddConfirm.asp, line 46, column 36
sql="INSERT INTO tblMembers VALUES("8"," & DateJoined & "",""& Title& "",""& LastName& "",""&FirstName& "",""& DOB & "",""& AddressUnit&"""

this is the code i have in my asp file....

Code:

View Replies View Related

Inserting Data :: Check If It Already Exists

I want to know how to search a database if a particular data is contained in it and then if the data is not there the page should go ahead to insert the data into the database and then redirect the user to another page but if the data is alraedy there it should go ahead a query another table where the user infomation where also stored.

View Replies View Related

How To Get Data From An Excel File And Inserting Them Into A Database Using Asp?

I would like to know if there are any tutorials out there or websites that can explain more about this? can this be done in asp?

View Replies View Related

Inserting Data Using A Form Into Two Access Tables

I have two tables Property & Landlord. I have a form and when it is filled in and submitted the information should be sent to the two tables, but i cant seem to get my head around this problem.

View Replies View Related

Error Inserting Form Data Into Database

I am trying to insert data from a form into a database and i am getting the following error:

Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.

The code that i used can be seen below: Code:

View Replies View Related

Inserting Arabic Data Into Access Database

I am trying to save arabic data from asp and it's not being saved with right encoding. i tried with both code pages 1252 and 1256. each time i am getting different set of characters in db, but not as i am entering in asp page.

when i retrieve arabic data from database and display in web pages it's showing correct text.

i am using following code in asp side: ....

View Replies View Related

Call Store Procedure For Inserting Data

I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store procedure(assume there are many columns in the table).

I need to insert data into two separate tables, the relation between these two tables is 1 row of data in table1 could have multiple rows in table2 related to table1, but if the data insertion into any one of the tables is failed, the transaction will roll back and no data will be remained in any of the tables.

If this needs to be handled in asp program using transact sql, how do I implement it. If I need to it using store procedure, how do I pass the error or success signal to asp program from database.

View Replies View Related

Inserting Dynamic Text Box Data Into A Database

Does anyone know how I can insert daynamic text box data into a SQL Server database? I have text boxes that are being generated dynamically and I want each of those values inserted into the database that hold the results. I'm not sure how to write my loop statement.

View Replies View Related

Inserting Data To SQL Database And Sending Email At The Same Time?

I’m attempting to insert some basic information (name, address, details) to the sql database and send a notification email (at the same time).

Right now, I can insert the information to the DB after I click submit, but how can I also receive an email? Please give some ideas how to do it.

View Replies View Related

Validating An Uploaded File Before Inserting Data In To Database

I am uploading a file using ASP code. After the user uploads the file, I would like to be able to open the file and check if the data is in a given format (comma separated) and also has all the data elements needed (i.e. all fields are there).

Is there a parse routine in asp that would allow me to do this. The user can upload any type of file as long as I am able to parse it and determine if the data is of the aforemention type.

View Replies View Related

Inserting Data Into A Database :: Page Cannot Be Displayed Error

I'm having a probelm with inserting data into a database using asp but I can't see what i'm doing wrong. I get the page cannot be displayed error ....

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

Securing User Data

How can I protect from SQL-injection in this instance?Code:

sql = "
SELECT dbo.admin.id, dbo.admin.email
FROM dbo.admin
WHERE dbo.admin.username = '"&Request.Form("user")&"'"

View Replies View Related

User Data Vs. Database

I have been thinking about storing some data, which my users upload, in text files rather than database, since often I do not know how much information users submit for things like item description or images URL paths.

This information may be very short or very long. MS SQL Server requires a maximum field length to be set. Thus, if user enters 5 characters into 5000 character field, a lot of space will be wasted. On the other hand, the database reference would point to the text
files to read users' data and display it on page.

View Replies View Related

How To Get Data From The User In One Page And Display Related Data In A New Page

how do i get data from a user on one page and display the result on the other page
actually i have written a prgoram that displays a set of checkboxes and based on the checkboxes selected the related data is displayed .but the problem is the data is displayed on the same page below the list of check boxes. Code:

View Replies View Related

User Entered Form Data

I am storing user entered form data from an ASP page in a MSSQL 2000 database. I would like to give my administrators a way to download a tab file with the entries. Is writing an ASP page the best way to do this? And if so, how can I convert database records into a file that will download through the browser?

View Replies View Related

Prevent User ReEntering Same Data In Fields

i have a table which has many field, they go across and are named as a1a2a3a4a5a6-a16 the next row will be b1b2b3b4b5b6-b16 the last row is g1g2g3g4g5g6-g16 and so on.

now in the first column i.e which would be a1 b1 c1 d1 e1 f1 g1, the user enters a part number what i want to do is prevent him or her entering the same part no.

twice if this the case the two filds with same part no should be cleared.i.e if user enter p45 in a1 then p45 in d1 then both a1 and d1 should be cleared would be better if the later was only cleared but any method would do. Code:

View Replies View Related

Preserving User Data Despite Session Timeout

I am developing an ASP application where the user may spend large amounts of time manipulating data on a worksheet. An amount of time that will certainly exceed the security mandated session timeout intervel of 15 minutes.

So the user pushes save after the session has timed out and is thrown to the user login window -- all according to standards. How can I either detect the timeout before the submit or preserve the user entered data despite the redirect?

View Replies View Related







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