|
 |
asp_databases thread: data type mismatch error
Message #1 by mpelley@c... on Tue, 6 Aug 2002 13:49:44
|
|
I keep getting a data type mismatch error when i try to run a simple
display script. I did some digging and found that there are some
difficulties using access especially with date/time objects, one of the
fields I am displaying is a date field but I've never had any difficulty
displaying date fields before. I checked the database and all of the field
names are right, I'm kind of stumped, I hope there is someone out there
that can help me out.
thanks mark
For reference i'm trying to display a bulettin board query for an employee
bulletin board (tbl_bbrd) dha's are health districts(tbl_dha) and the dha
table holds the names of the health districts
<%
dha=request.form("intDha")
set contoDb=Server.CreateObject("ADODB.Connection")
contoDB.ConnectionTimeout=30
contoDB.Open "DSN=Intra"
set rsbbrd=Server.CreateObject("ADODB.RecordSet")
strSQL= "Select tbl_bbrd.strItem, tbl_bbrd.strDescrip, tbl_bbrd.strDate,
tbl_DHA.strDha " &_
"From tbl_bbrd, tbl_DHA " &_
"WHERE tbl_bbrd.intDhakey='" &dha& "'and
DHA.intDhaKey= '"&dha&"'"
set rsbbrd=contoDB.Execute(strSql)
%>
Message #2 by "Drew, Ron" <RDrew@B...> on Tue, 6 Aug 2002 13:03:11 -0400
|
|
Not sure if you are missing continuation and the space between 'and
but try this.
strSQL=3D "Select tbl_bbrd.strItem, tbl_bbrd.strDescrip,
tbl_bbrd.strDate,
tbl_DHA.strDha " &_
"From tbl_bbrd, tbl_DHA " &_
"WHERE tbl_bbrd.intDhakey=3D'" &dha &_
"' and DHA.intDhaKey=3D tbl_bbrd.intDhakey"
-----Original Message-----
From: mpelley@c... [mailto:mpelley@c...]
Sent: Tuesday, August 06, 2002 9:50 AM
To: ASP Databases
Subject: [asp_databases] data type mismatch error
I keep getting a data type mismatch error when i try to run a simple
display script. I did some digging and found that there are some
difficulties using access especially with date/time objects, one of the
fields I am displaying is a date field but I've never had any difficulty
displaying date fields before. I checked the database and all of the
field
names are right, I'm kind of stumped, I hope there is someone out there
that can help me out.
thanks mark
For reference i'm trying to display a bulettin board query for an
employee
bulletin board (tbl_bbrd) dha's are health districts(tbl_dha) and the
dha
table holds the names of the health districts
<%
dha=3Drequest.form("intDha")
set contoDb=3DServer.CreateObject("ADODB.Connection")
contoDB.ConnectionTimeout=3D30
contoDB.Open "DSN=3DIntra"
set rsbbrd=3DServer.CreateObject("ADODB.RecordSet")
strSQL=3D "Select tbl_bbrd.strItem, tbl_bbrd.strDescrip,
tbl_bbrd.strDate,
tbl_DHA.strDha " &_
"From tbl_bbrd, tbl_DHA " &_
"WHERE tbl_bbrd.intDhakey=3D'" &dha& "'and
DHA.intDhaKey=3D '"&dha&"'"
set rsbbrd=3DcontoDB.Execute(strSql)
%>
|
|
 |