'' is not a valid name. Make sure that it does not include invalid

  • 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

  • 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

    Try with the above. You are putting . after Account Reference No. I hope it should work out.

  • Thanks but thats whats in the colum name in Excel

    Its with a dot [Account Reference No.]

    Any work around?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply