Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Adodc consulting


Message #1 by "Alexander Castaneda" <aacm_alex@h...> on Wed, 29 May 2002 15:27:23
I am trying to do a date consulting.  I need to find an especific group in 
the database. 
 The database is in visual foxpro, and this link whit a odbc
 I'm doing the program in visual basic 6.0
   
The code is as follows:

Dim manana As Date

datPrimaryRS.RecordSource = "Select promotor,feccita, horacita, NITCC from 
contact1 where feccita  = # " & manana & " # "
datPrimaryRS.Refresh

best regards

Alexander Castaņeda M.
aacm_alex@h...
Message #2 by "Futuh COKLU" <futuh@p...> on Wed, 29 May 2002 18:39:24 +0300
Hi Alexander,

Change your syntax as below. Hope this will solve your problem.

'---------------------------------------------------------------------------
--------------
Dim strDate As String
.
.
'use string format for date
strDate = "29/05/02"        ' date format should be match with your DBF file
date format. /   "dd/mm/yy" or "mm/dd/yy"

datPrimaryRS.RecordSource = "SELECT promotor,feccita, horacita, NITCC " & _
                                                "FROM contact1 WHERE feccita
= CTOD('" & strDate & "')"
datPrimaryRS.Refresh

'---------------------------------------------------------------------------
--------------

Futuh


-----Alexander Castaneda wrote: ----------------------------


 I am trying to do a date consulting.  I need to find an especific group in
 the database.
  The database is in visual foxpro, and this link whit a odbc
  I'm doing the program in visual basic 6.0

 The code is as follows:

 Dim manana As Date

 datPrimaryRS.RecordSource = "Select promotor,feccita, horacita, NITCC from
 contact1 where feccita  = # " & manana & " # "
datPrimaryRS.Refresh

 best regards

 Alexander Castaņeda M.
 aacm_alex@h...


Message #3 by "=?iso-8859-1?B?QWxleGFuZGVyIENhc3Rh8WVkYQ==?=" <aacm_alex@h...> on Thu, 30 May 2002 12:08:50 -0500
<html><div style='background-color:'><DIV>
<P>I will use your sentence for my program.</P>
<P>Thanks for your answer.</P>
<P>&nbsp;</P></DIV><BR>
<DIV>Ing. <FONT face="Geneva, Arial, Sans-serif">Alexander Castaņeda M. </FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif">CTI Direct </FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif">e-mail: </FONT><A href="mailto:alex@c..."><FONT
face="Geneva, Arial, Sans-serif">alex@c...</FONT></A><FONT face="Geneva, Arial,
Sans-serif"></FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif">Tel.: (571) 5219057 Ext 207</FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif"><A
href="http://www.ctidirect.com/">www.ctidirect.com</A></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>&gt;From: "Futuh COKLU" <FUTUH@P...>
<DIV></DIV>&gt;Reply-To: "ASP Databases" <ASP_DATABASES@P...>
<DIV></DIV>&gt;To: "ASP Databases" <ASP_DATABASES@P...>
<DIV></DIV>&gt;Subject: [asp_databases] Re: Adodc consulting 
<DIV></DIV>&gt;Date: Wed, 29 May 2002 18:39:24 +0300 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Hi Alexander, 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Change your syntax as below. Hope this will solve your problem. 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;'--------------------------------------------------------------------------- 
<DIV></DIV>&gt;-------------- 
<DIV></DIV>&gt;Dim strDate As String 
<DIV></DIV>&gt;. 
<DIV></DIV>&gt;. 
<DIV></DIV>&gt;'use string format for date 
<DIV></DIV>&gt;strDate = "29/05/02" ' date format should be match with your DBF file 
<DIV></DIV>&gt;date format. / "dd/mm/yy" or "mm/dd/yy" 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;datPrimaryRS.RecordSource = "SELECT promotor,feccita, horacita, NITCC " &amp; _ 
<DIV></DIV>&gt; "FROM contact1 WHERE feccita 
<DIV></DIV>&gt;= CTOD('" &amp; strDate &amp; "')" 
<DIV></DIV>&gt;datPrimaryRS.Refresh 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;'--------------------------------------------------------------------------- 
<DIV></DIV>&gt;-------------- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;Futuh 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;-----Alexander Castaneda wrote: ---------------------------- 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; I am trying to do a date consulting. I need to find an especific group in 
<DIV></DIV>&gt; the database. 
<DIV></DIV>&gt; The database is in visual foxpro, and this link whit a odbc 
<DIV></DIV>&gt; I'm doing the program in visual basic 6.0 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; The code is as follows: 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; Dim manana As Date 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; datPrimaryRS.RecordSource = "Select promotor,feccita, horacita, NITCC from 
<DIV></DIV>&gt; contact1 where feccita = # " &amp; manana &amp; " # " 
<DIV></DIV>&gt;datPrimaryRS.Refresh 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; best regards 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; Alexander Castaņeda M. 
<DIV></DIV>&gt; aacm_alex@h... 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt; 
<DIV></DIV>&gt;--- 
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV></div><br clear=all><hr>Descargue GRATUITAMENTE MSN Explorer en <a
href='http://g.msn.com/1HM306201/27'>http://explorer.msn.es</a>.<br></html>

  Return to Index