Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 6th, 2012, 10:25 AM
Registered User
Points: 90, Level: 1
Points: 90, Level: 1 Points: 90, Level: 1 Points: 90, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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/
Reply With Quote
  #2 (permalink)  
Old January 6th, 2012, 10:47 AM
Authorized User
Points: 483, Level: 7
Points: 483, Level: 7 Points: 483, Level: 7 Points: 483, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: Edgewood, NY, USA.
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.
Reply With Quote
  #3 (permalink)  
Old January 7th, 2012, 02:20 AM
Registered User
Points: 90, Level: 1
Points: 90, Level: 1 Points: 90, Level: 1 Points: 90, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 01:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.