If you've copied and pasted your SQL query and run it directly in your database and it's not returning any records, then either the data in your database doesn't match the criteria in your SQL statement or there's something wrong with your SQL statement. Dan
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 08 June 2005 11:52 To: [email protected] Subject: RE: [AspClassicAnyQuestionIsOk] How to check? no,it returns 0 only Jegatha Dan Powderhill <[EMAIL PROTECTED]> wrote: response.write your SQL statement out to the browser, copy and paste it into a query in your database and see if it returns any records there. Dan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 08 June 2005 11:18 To: [email protected] Subject: RE: [AspClassicAnyQuestionIsOk] How to check? yes Dan if the record exist there it should return 1,if not c=0.But now it returns 0 only. Jegatha Dan Powderhill <[EMAIL PROTECTED]> wrote: So it's returning c as 1 all the time? Dan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 08 June 2005 10:27 To: [email protected] Subject: RE: [AspClassicAnyQuestionIsOk] How to check? ya certainly i have. jegatha Dan Powderhill <[EMAIL PROTECTED]> wrote: And you're certain that there is data which matches your criteria in the database? Dan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 08 June 2005 09:58 To: [email protected] Subject: RE: [AspClassicAnyQuestionIsOk] How to check? ya Dan i already done this ,but always it returns the true part only ,not consider the false part.Here my coding it returns always 0. connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" connStr = connStr & Server.MapPath("/access_db/eform.mdb") sSQL="select * from eform where companyname='"&Cname&"' AND contactaddress='"&ConAddress&"' AND emailid='"&EmaId&"' AND productinterest='"&ProInter&"'" rs.Open sSQL, connStr,1,2 if rs.EOF then c=0 else c=1 end if response.write c Dan Powderhill <[EMAIL PROTECTED]> wrote: Do a select on the database using the fields you have as the where clause and see if it returns anything. set objConn = Server.CreateObject("ADODB.Connection") objConn.Open strConnectionString set rsRecordset = Server.CreateObject("ADODB.Recordset") sSQL = "SELECT * FROM [myTable] WHERE [myField] = 'myvalue' AND [myField2] = 'myvalue2';" rsRecordset.Open sSQL, objConn, adOpenForwardOnly, adLockReadOnly if rsRecordset.EOF then 'Record doesn't exist else 'Record does exist end if rsRecordset.close objConn.close set rsRecordset = nothing set objConn = nothing Dan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jegatha Sent: 08 June 2005 08:55 To: Asp Subject: [AspClassicAnyQuestionIsOk] How to check? Hi Friendz need to check if the record is already exsist or not? how to out it?, thankz. regards, jegatha --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com [Non-text portions of this message have been removed] ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] --------------------------------- Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com [Non-text portions of this message have been removed] ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] --------------------------------- Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com [Non-text portions of this message have been removed] ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] --------------------------------- Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com [Non-text portions of this message have been removed] ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] --------------------------------- Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --------------------------------- Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com [Non-text portions of this message have been removed] ________________________________ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> <!-- SpaceID=1705006764 loc=TM noad --> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
