Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2012, 10:25 AM
Registered User
 
Join Date: Jan 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default asp excel access unique user_id

i m very new to asp and working on a project using asp and access not asp.net……….

I have a small application in which after login, user can upload .xls file, then the record from this excel file is inserted to access database, my sample project files are working fine i.e file uploaded and inserted to access ...my problem is that i want to insert data of that excel file in access with the unique user_id of particular user, because many users can insert excel files to same table, so that when user click on ‘view records’ user should see only his record, not the record of others.
and another thing is that how to save file with unique file name corresponds to the login user to avoid duplication of files... (pls suggest me wht to do… or any other idea……. i really need help…….)
many thanks

this is the url from which I download and using files for upload and insert excel data to access..

shotdev.com/asp/asp-excel/asp-upload-excel-import-to-database/
 
Old January 6th, 2012, 10:47 AM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hi Asad

Looking at the database from the sample link you sent< i assume you are using that exact database with same field names. that database is using a unique field called 'customer_ID'. This ID is already being created as each excel file is being uploaded.

so all you needed to do is create a query to get the recordset of that viewer's id:
Code:
SQL = "SELECT * FROM customer2 where Email = '"&Email&"' "
Assuming you are using their email as a username.

as for duplicate files, Your upload system might automatically write over files with same name avoiding a duplicate. do a test first and confirm this.
 
Old January 7th, 2012, 02:20 AM
Registered User
 
Join Date: Jan 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by melkin View Post
Looking at the database from the sample link you sent< i assume you are using that exact database with same field names. that database is using a unique field called 'customer_ID'. This ID is already being created as each excel file is being uploaded.

so all you needed to do is create a query to get the recordset of that viewer's id:
Code:
SQL = "SELECT * FROM customer2 where Email = '"&Email&"' "
Assuming you are using their email as a username.

as for duplicate files, Your upload system might automatically write over files with same name avoiding a duplicate. do a test first and confirm this.
thankyou so much melkin for your help. i am working on it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access nested collection with unique Key jani Excel VBA 0 May 21st, 2008 04:02 PM
ASP with MS Access unique ID AA00 -> ZZ99 sv3n1980 Access ASP 0 May 9th, 2007 08:11 AM
using vbscript in asp to import excel into access wpiass Access 11 April 26th, 2007 04:35 PM
Importing Excel sheet into Access using ASP prasanta2expert ASP.NET 1.0 and 1.1 Basics 1 October 5th, 2006 02:36 PM
Inserting user_ID of logged in user frosty ASP.NET 2.0 Basics 3 July 28th, 2006 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.