sql server to access

Results 1 to 3 of 3

Thread: sql server to access

  1. #1
    Join Date
    Dec 1969

    Default sql server to access

    Im trying to develop an application that is based on a SQL Server database. However to work with it on my home PC ive converted this to an Access database.<BR><BR>There is some code to connect to the database (created in global.asa) and an execute command that i dont think is supported in Access as i get an error message at that line.<BR><BR>The existing code is -<BR><BR>Dim newscnn, newsrs<BR>Set newscnn = Server.CreateObject("ADODB.Connection")<BR>newscnn .Open Application("sConnect")<BR>newssSQL= "SELECT he.hub_news_id, he.hub_dept_id, he.hub_news_title, he.hub_news_desc, he.hub_news_link, he.hub_news_email, he.hub_news_time, he.hub_news_date, he.hub_publish_id, hu.hub_user_nice FROM hub_news he, hub_user hu WHERE (he.hub_publish_id &#060;&#062; 1) AND (hu.hub_dept_id = he.hub_dept_id) AND (he.hub_news_date &#060;= &#039;" & today & "&#039;) ORDER BY he.hub_news_date DESC, he.hub_news_time DESC"<BR>SET newsrs = newscnn.Execute(newssSQL) <BR><BR>THe error message i get is - <BR><BR>Microsoft JET Database Engine error &#039;80040e07&#039; <BR><BR>Data type mismatch in criteria expression. <BR><BR>/intranet/index.asp, line 15 <BR><BR>This refers to the last line of the code - <BR><BR>SET newsrs = newscnn.Execute(newssSQL)<BR><BR>How can i translate this to work with Access?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: sql server to access

    because Access uses the # symbol/character in date/time fields<BR><BR>Hope this Helps!<BR>Sincerely<BR><BR>Vlince

  3. #3
    Join Date
    Dec 1969

    Default Yeah your date

    he.hub_news_date &#060;= #" & today & "#<BR><BR>-- Whol

Posting Permissions

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