i have some excel file which export from sybase, but it can only export to Excel ver2.1.then I connect and import to SQL Database. The result is error and prompt cannot read the Excel format.Finally I try use Excel 2003 to open the exce v2.1 and save as 2003 version. Then import again, it can success to import to SQL database.my connection string excel properties = 8.0i tried to change 8.0 to 2.1 or 5.0, the result is still cannot import. how to import v2.1 directly. no need use Excel to open and save again.another question, if I want import more than one excel, how can I import all one time only.
I am developing a website admin control page....I have to import data from an excel sheet to a table...the table same columns as excel sheet....how do i import data from excel sheet....also i have to make every record unique by giving a unique ID.
I have a problem that currently we are use a sybase database and we want to create application that give me a output in excel report that's mean my data stored at sybase or mysql and we access it from this after it generate my report in excel form and give this output on excel format?
I have used ASD.NET code using SQL Database for Transaction operation successfully. By changing the Database Code to interface with MYSQL an Error occurs. If I remove the Transaction Code from within the the application, it works OK by displaying the MYSQL data (Read Only) in the layout of the application. I am using Mysql Essential-4.1.22-win32 and MYSQL Connector ODBC-3.51.2. My objective is to EDIT the MYSQL Data.
I'm writing a reporting tool that, as a starting point, needs to create a DB table from a csv file. This csv file will have been created from exporting data from our old system (with the new system being the reporting tool) and can have up to 300 columns of data. I've been trying as follows:
but am finding that only the first 255 columns get put in. I am assumg that the Jet driver is the one that is limiting the columns, or is there a registry setting somewhere that'll solve it quickly?
Is there another approach that'll work? I've though of the following, but as it'll take a while to recode and test each time I thought I'd ask the experts first!!
BULK INSERT: would mean that I'd need to pre-create the table first, but if the issue is with the Jet driver I'd surely get the same problem? Use a datatable: it seems pretty fiddly and probably a lot slower, but I guess I could read into a dataset and then bind that to a table to insert? Again the table would need to exist and the driver that I use to read from the csv would be the issue? Do it one row at a time in a loop in the code: assuming I can read the file as text, I could then split the data in code into an array and create a insert statement (again to an existing table) for each row. With what could be 1000s of rows I can't imagine that this is the fastest solution!
Not that it should matter.. the 2nd value in the csv is an IP address.. its in the file as 192.168.7.25(just an example), but gets read as 192.1687, if the file is setup as delimited in the connection string, does that have any restraints on the data being read? When i open the file in notepad, the comma is at the end of the IP address, when i open it in excel it is in its own column.. so what could be causing this? Because of this issue with the truncation, that is what is causing the primary key issue.. because there are other values that are similar like these:
192.168.7.25 192.168.7.26 192.168.7.45
because if the issue, it passes each one of those as 192.1687 Here is the table structure, in case it helps resolve this issue.
[id] [int] NOT NULL, [IpAddress] [varchar](16) NOT NULL, [MacAddress] [varchar](16) NULL, [APTypeId] [int] NOT NULL, [APUser] [varchar](256) NULL, [APPass] [varchar](128) NULL, [APLocation] [varchar](20) NULL, [APFreq] [varchar](50) NOT NULL, [APBand] [varchar](50) NOT NULL,