I have scoured the web for everything related to CSV imports in ASP. I have everything working, but one issue remains.
My web application accepts a file upload of a Tab Delimited text file, parses through it to create a Comma Delimited file, creates that file on the server, and then goes to the CSV import page.
The CSV import page accesses the Comma Delimited file through ODBC text driver, and I generate SQL insert statements from each record. The problem is, one field is a "room number" field which generally contains numbers, but several entries also contain letters, an entry might be "A121" or "AUD" or "254", etc.
I'm guessing that ASP or the ODBC text driver "guesses" the datatype of the field, because whenever it hits a record with letters in the "room number" field, it uses the last numeric value for that field from any previous record. If there are multiple records with letters in this field, it will continually show the most recent numeric entry from that field, even if it was 5 or 10 records ago!
I am accessing these values using recordset("fieldname"), and all other fields display correctly, except recordset("roomnumber") when there are letters and numbers in the entry.
I've opened the CSV directly on the server and the fields are all fine, in the "room numbers" field, the entries which are all numbers are right-aligned, while entries with numbers and letters are left-aligned, but I assume that's just the way Excel displays them.
I am aware that adding quotation marks around this field would solve the problem, but there is no way I can have the data format changed. I might try to add quotations while creating the CSV file on the server, but this is such a strange problem that I'd like to figure it out anyways.
I still have problem to import the text file delimited by tabs or commas into the database.
I refer to http://www.connectionstrings.com/ for the connection, ODBC doesn't work and OLD DB works only for csv files. Any idea? Does anybody has workable samples?
Standard: "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c: xtFilesFolder;Extensions=asc,csv, tab,txt;"
OLE DB Standard: "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c: xtFilesFolder;Extended Properties=""text;HDR=Yes;FMT=Delimited"""
nowdays im facing a real problem at work i had finish my project but the remainig is only the import can any body show me how i can import data from cvs file and store it in sql server 2000 i hope i get the answer as soon as posible
I have a problem with including an object in my asp page. I�ve translated an algoritm I found that was written in javascript and it needs a method, floor(), from System.Math to work.
in javascript you can just write Math.floor(x+1) but it seems asp doesn�t automatically include that Math object. It�s a little weird since the method Round() can be used withour any includes of any kind and thats a part of the Math object!
I have a main page called you.asp .In this asp page there is a question What is your gender ? followed with 2 Radio buttons Female and Male.When I select the option Female I want to import QESTF.asp to the main page which is you.asp and when I select the option Male , it should import QESTM.asp to the main page. QESTF.asp and QESTM.asp has only a greeting message. How can I do it ?
I have created a user lists from a database (UserProfiles.mdb) using asp. There is the possibility to click on the different usernames in the list to go to a page with more information about the user:
the link to this page is: <a href="test_bis.asp?userid=<%=userid(j)%>"><%=un(j)%>">
when you click, it works, e.g. http://localhost/Test/DataQuality/U...s.asp?userid=15
My problem is that I need the variable userid to create the new page. I made a test to see if this variable was "imported" in the new page and thus with: Response.Write userid, but I do obtain a blank!! Code:
I'm importing data from a csv file but have the following problem.
It see any comma in a specific column as the end of the current column and move the rest of the values into the next column I.E Data from column 4 display as data from column 5.
I do know that it's comma delimited but would like to know if there's no way that I can distinguish between the commas in a column and the commas that indicate a new column.
Col1 Col2 Col3 Col4 Col5 Value Value Value Val,ue Value
i have a website and i use do import data , but with diffrent types(*.xls,*.xml...) how can i concept a inteface to read all this files i now my question is not clear but iit's freindly to answer me
I planning to create a calendar function which bind to the Microsoft Exchange Server. I need to know how can I retrieve the Calendar information like appointment, meeting and etc from the exchange server by using the ASP
My Goal I want to load from a CSV File into variables so I can use the values in a procedure I've developed. But I'm stuck on how to access values from a csv file. If everything were to be in a Database everything would be just easier but sometimes you don't have the options of having a database.
Now what I'm wanting to do is load the output into asp variables so i can use them in a procedure I've created. Code:
I' m trying to import an Excel file in a SQLServer db. If I specify the spreadsheet name it works correctly. Now I'd like to import the spreadsheet without specify its name. Is there a way to retrieve the spreadsheet names of my Excel file in ASP?
I need to find a way to import a csv file into a sql database via classic asp or if easy .net to update a table. Every time this is imported i would like to overwrite the existing data in the database.
My company recently hired a third party to handle phone orders during off hours. The third party wants to be able to update our database through their own interface. We are running SQL Server 2000 on Windows 2000 Server with ASP.NET 1.1. The number one thing that come to mind is security for credit cards. Perhaps some kind of web service, xml, etc.? Does anyone have any suggestions on the best way to handle this?
I want to be able to import data from active directory using an asp page. The problem is that i don't want to provide any username or login, i want the system to identify the logged user.
the script is runing fine if i provide the username and the password in the script but when i delete them i receive this error messahe : Providererror '80040e37' - Table does not exist Code:
I have searched a lot at GOOGLE, but i can't found the way to import data from a form textarea into database. Actually my web page would like to allow the user to export their phone book from excel file or outlook phone book, then import into my database.
I was thinking to provide a textarea for the user to COPY and PASTE their address book from the text file and then my web page will read line by line to store the data into the database.
Example data: abc, abc@hotmail.com, 999999999 bcd, bcd@hotmail.com, 888888888
i can't find any solution that can read line by line, because normally when the we parse the data from the form textarea. All the text will become string that without the <br>.
I have searched a lot at GOOGLE, but i can't found the way to import data from a form textarea into database.
Actually my web page would like to allow the user to export their phone book from excel file or outlook phone book, then import into my database.
I was thinking to provide a textarea for the user to COPY and PASTE their address book from the text file and then my web page will read line by line to store the data into the database. Code:
Sorry if this is the wrong place but does anyone have a script which will export data from an access database to an excel spreadsheet allow a user to edit and then import the edited excel spreadsheet into the db?
I copy my emails from microsoft inbox and save it into a textfile and try to read the information and save it into access table. But during i read the textfile i am stuck.
Dim fso, fil, ts, sContents Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fil = fso.getfile(server.mappath("myemails.txt")) Set ts = fil.openastextstream(1) sContents = ts.readall aBuild = Split(sContents, "From:", 2) sFrom = Split(aBuild(1), vbCrLf, 2)(0) response.write(sForm) ts.close Set ts = nothing Set fil = nothing Set fso = nothing
Basically, I want to have an asp page that has a button where when you click on it, it opens up a file open dialog box where you can search for any excel file you want to import. Then, once a file is selected, I want to read all the contents of the excel file (from column A) to display into a listbox on the screen (so that each individual row from excel file would be a separate item in the listbox). Also, this data would have to be inserted accordingly into an access database .....
Due to the nature of our system, we need to dynamically import certificate files into windows certificates store and access the certificate store from ASP pages, these ASP pages call a VB dll component, which uses the CAPICOM component to manipulate windows certficate store.
Because ASP is running under IWAM account, we got "Access is denied" error when trying to import the certificate files. We registered the VB components under COM+ to get around this security problem. However, recently we are experiencing all sorts of problems with COM+ ( eg. DLLHost.exe hang with 100% CPU after heavy traffic, ActiveX component can not be created out of sudden), we decided to move this VB component out of COM+, which means we are facing the same old "Access is denied" problem again. Code: