None I know about, but you can select a range from the sheet like: SELECT * FROM [Sheet1$A4:F1243] Which could solve your problem.
But you would need to know, or find out, how many rows there are before doing the select.
OK, I'm just looking at this again, mainly for future reference (though I'll likely forget).
Thank you, yes, that works as described -- or very nearly. The problem is that the name of the sheet contains a SPACE and therefore has to be within apostrophes e.g. ['sheet 1$'] and I have been unable to get that to work with a range.
System.Data.OleDb.OleDbException (0x80040E37): The Microsoft Access database engine could not find the object ''Report 1$B5:AE5737''. System.Data.OleDb.OleDbException (0x80040E37): The Microsoft Access database engine could not find the object ''Report 1$'B5:AE5737'.
Just for testing I renamed the sheet to remove the SPACE and it works.
I have designed my database with a one to many relationship where one user can have many statistics, but now I need to display the data in a single row format.
The UserStatistics table has a foreign key to the User table (user_id in UserStatistics)
Statistics might be height, weight, etc...
The table should look like this:
Name | Height | Weight
Joe 6' 150
And so on. The header will always be the same (Name, Height, Weight or whatever) but any time the user does not have that particular statistic I need a blank column. Do I need to rejoin against the UserStatistics table over and over again to get the results I need or what?
we have written program in C#.
now when we change the database(in sql express 2008) sp OR view OR add new table OR delete table OR ....
how can update the old customer DB within the newest one without changing the data in customer DB.
in other word : the customers have previous application and database (full with their specific data). Now a new version is ready and the customer gets the update. In the mean time we made some modification on DB (new table, columns, maybe an old column deleted, or whatever). I’m pretty new in Linq and also SQL databases and my first solution can be: I check the applications/databases version and implement all the changes step by step comparing all tables, columns, keys, constrains, etc. (all this new information I have in my dbml and the old I asked from the existing DB). And I’ll do this each time the version changed. But somehow I feel, this is NOT a smart solution so I look for a general solution of this problem.