This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C53A0F.CEB7CE40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hey there,
I have a script that writes to an Access database with the following =
columns.
ComputerName UserID ProfileSize LastModDate
I would like to perform a multiple field search in ADO rather than a =
single column recordset search. Is there anyway to do that. Below is =
what I currently have for single column searches.
****************************
PCName =3D "mycomputer"
ProfileName =3D "dabungis"
strSearchCriteria =3D "ComputerName =3D '" & PCName & "'"
objRecordSet.Find strSearchCriteria
If objRecordset.EOF Then 'if not found, then add new record
objRecordset.AddNew
End If
************************
I would like to perform a multiple field search such as below.
******************************
PCName =3D "mycomputer"
ProfileName =3D "dabungis"
strSearchCriteria =3D "ComputerName =3D '" & PCName & "' and UserID =3D =
'" & ProfileName & "'"
objRecordSet.Find strSearchCriteria
If objRecordset.EOF Then 'if not found, then add new record
objRecordset.AddNew
End If
******************************
However, I always receive an error like below.
"ADODB.Recordset: Arguments are of the wrong type, are out of acceptable =
range, or are in conflict with one another."
What's wrong?
-Jeff
------=_NextPart_000_000C_01C53A0F.CEB7CE40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1492" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial>Hey there,</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>I have a script that writes to an Access =
database with the=20
following columns.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>ComputerName =
UserID =20
ProfileSize LastModDate</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>I would like to perform a multiple field search =
in ADO=20
rather than a single column recordset search. Is there anyway to =
do=20
that. Below is what I currently have for single column=20
searches.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>****************************</FONT></DIV>
<DIV><FONT face=3DArial>PCName =3D "mycomputer"</FONT></DIV>
<DIV><FONT face=3DArial>ProfileName =3D "dabungis"</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>strSearchCriteria =3D "ComputerName =3D '" =
& PCName=20
& "'"<BR> objRecordSet.Find strSearchCriteria</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial> If objRecordset.EOF Then 'if =
not found,=20
then add new record<BR> objRecordset.AddNew<BR> =
End=20
If</FONT></DIV>
<DIV>
<DIV><FONT face=3DArial>************************</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>I would like to perform a multiple field search =
such as=20
below.</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>******************************</FONT></DIV>
<DIV><FONT face=3DArial>
<DIV><FONT face=3DArial>PCName =3D "mycomputer"</FONT></DIV>
<DIV><FONT face=3DArial>ProfileName =3D "dabungis"</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>strSearchCriteria =3D "ComputerName =3D '" =
& PCName=20
& "' and UserID =3D '" & ProfileName & "'"<BR> =
objRecordSet.Find=20
strSearchCriteria</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial> If objRecordset.EOF Then 'if =
not found,=20
then add new record<BR> objRecordset.AddNew<BR> =
End=20
If</FONT></DIV>
<DIV>******************************</DIV>
<DIV> </DIV>
<DIV>However, I always receive an error like below.</DIV>
<DIV>"ADODB.Recordset: Arguments are of the wrong type, are out of =
acceptable=20
range, or are in conflict with one another."</DIV>
<DIV> </DIV>
<DIV>What's wrong?</DIV></FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV>
<DIV><FONT face=3DArial>-Jeff</FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_000C_01C53A0F.CEB7CE40--