ASP,sql and arrays

Results 1 to 2 of 2

Thread: ASP,sql and arrays

  1. #1
    Join Date
    Dec 1969

    Default ASP,sql and arrays

    I have an array called arrPages<BR><BR>Isnumeric(arrPages(1)) give me true<BR>Response.write arrPages(1) give me 13<BR><BR>I use Access 97<BR>My table called INDEXE has 2 fields:<BR>Keyword: Text<BR>Info_ID:declared as a Number and more precisely as a Info_ID<BR>These 2 fields are the primary key of the table INDEXE<BR><BR>If I write:<BR>sql="SELECT * FROM INDEXE WHERE Info_ID=13"<BR>NO PROBLEM !!!!<BR><BR>But if I write:<BR>sql="SELECT * FROM INDEXE WHERE Info_ID=&#039" & arrPages(i) & "&#039"<BR><BR>Microsoft JET Database Engine error &#039 80040e07&#039 <BR>Data type mismatch in criteria expression.<BR>/Handbook/Projects/TESTSQL/Includes/SortPages.asp, line 37<BR><BR>line 37:<BR>rs.Open sql, connect,adOpenForwardOnly <BR><BR><BR>Is there a hope somewhere...<BR>Thanks for your help

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP,sql and arrays

    Don&#039t put quotes around arrPages(i), do this:<BR><BR>"select * from indexe where info_id = " & arrPages(i)<BR><BR>If that doesn&#039t fix it, maybe arrPages(i) is empty.<BR><BR>Ben

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts