ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. (https://www.excelbanter.com/excel-programming/404834-error-not-valid-name-make-sure-does-not-include-invalid-characters-punctuation-not-too-long.html)

rote

Error '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
 
Hello Everyone,
I'm retrieving data from Excel from my asp.net page
The WorkSheet name is StatusPasPorts.

When i remove the column [Account Reference No.] it does work fine but if i
use it i get error :
'' is not a valid name. Make sure that it does not include invalid
characters or punctuation and that it is not too long.

SELECT [Event Date],[Mobile Number],[Event Type Name],[Identification
Method],[Customer DOB],[Account Reference No.] FROM [StatusPasPorts$] where
[Mobile Number] = '" + this.TextBox1.Text.ToString() + "' order by [Event
Date] ASC

Any ideas what i'm missing.

Thanks in Advance





Tim Williams

Error '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
 
Have you tried not using a period in the column name?

Tim

"rote" wrote in message
...
Hello Everyone,
I'm retrieving data from Excel from my asp.net page
The WorkSheet name is StatusPasPorts.

When i remove the column [Account Reference No.] it does work fine but if
i use it i get error :
'' is not a valid name. Make sure that it does not include invalid
characters or punctuation and that it is not too long.

SELECT [Event Date],[Mobile Number],[Event Type Name],[Identification
Method],[Customer DOB],[Account Reference No.] FROM [StatusPasPorts$]
where [Mobile Number] = '" + this.TextBox1.Text.ToString() + "' order by
[Event Date] ASC

Any ideas what i'm missing.

Thanks in Advance








All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com