If DB is MySQL, try:
If DB is MySQL, try:
Hello,
Is there a small sample program available that allows me to connect to a table, browse, search, add a record, edit a record and delete a record. I am considering switching from DBF to SQL; but I am completely new to SQL. I own MSSQL, but my clients may want to use a less expensive version of SQL, what SQL would you recommend? What would be a good reference guide for converting my application to SQL especially converting the data? I would also need to write web based code to access the same SQL data. I would appreciate your feedback.
Thank you!
Rick Lipkin wrote:Michel
@ 0, 0 LISTBOX oBrow FIELDS ;
oRs:Fields("CODE"):Value, ;
oRs:Fields("DESC"):Value, ;
oRs:Fields("progid"):Value ;
SIZES 80,250,80 ;
HEADERS "Code", ;
"Description", ;
"ProgID" ;
of oGRP
oLbx:nClrPane:={|| IIF(oRs:AbsolutePisition % 2==0,CLR_LGREEN,CLR_LGRAY)}Sorry
AbsolutePosition
not
AbsolutePisition
Sorry for the spelling mistake
Manuel
Try this code based on a specific fields in your table .. the colors are based on dates in each row..
Rick
oBRW:nClrText := ;
{ || SelColor( oRs:Fields("code"):Value,oRs:Fields("DEL_CODE"):Value,oRs:Fields("EXPIR_DATE"):Value,oRs:Fields("DELETED"):Value,"F" ) }
oBRW:nClrPane := ;
{ || SelColor( oRs:Fields("code"):Value,oRs:Fields("DEL_CODE"):Value,oRs:Fields("EXPIR_DATE"):Value,oRs:Fields("DELETED"):Value,"B" ) }
oBrw:nClrForeFocus := ;
{ || SelColor( oRs:Fields("code"):Value,oRs:Fields("DEL_CODE"):Value,oRs:Fields("EXPIR_DATE"):Value,oRs:Fields("DELETED"):Value,"F" ) }
//------------------------------
Static Func SelColor( cCODE,cDEL,dEXP,dDEL,cTYPE )
LOCAL nCOLOR := CLR_BLACK
IF EMPTY(dEXP)
dEXP := CTOD("00/00/00")
ENDIF
IF EMPTY(dDEL)
dDEL := CTOD("00/00/00")
ENDIF
DO CASE
CASE cTYPE = 'F'
IF cDEL <> " " .and. dDEL = CTOD("00/00/00")
nCOLOR := CLR_WHITE // red
ELSE
nCOLOR := CLR_BLACK
ENDIF
CASE cTYPE = 'B'
DO CASE
CASE dEXP < DATE() .and. dDEL = CTOD("00/00'00")
nCOLOR := RGB(255,255,0) // yellow
CASE cCODE <> "98" .and. cCODE <> " " .and.;
cCODE <> "**"
nCOLOR := RGB(255,128,0) // orange
CASE cDEL <> " " .and. dDEL = CTOD("00/00/00")
nCOLOR := RGB(192,3,51) // red
OTHERWISE
nCOLOR := CLR_WHITE
ENDCASE
ENDCASE
RETURN( nCOLOR )
nageswaragunupudi wrote:Please try
oLbx:nClrPane:={|| IIF(oRs:AbsolutePosition % 2==0,CLR_LGREEN,CLR_LGRAY)}
Rick Lipkin wrote:
I wrote a thread on the subject with samples:
http://fivetechsoft.com/forums/viewtopi ... &highlight
Rick Lipkin wrote:Manuel
Try this code based on a specific fields in your table .. the colors are based on dates in each row..
Manuel
Good luck with Oracle .. you need to have an installed Client for Oracle for msdora and or oraoledb .. not native to Windows OS like Sql server.
Haven't had much luck in that areana. I am running Vista and the Ora9i cd's I use have a compatability alert when I try to install the setup ..
I kinda gave up on Oracle and ADO for now .. if you have any luck or can point me in the direction to a 'vista' compatable Oracle client .. please let me know.
Rick Lipkin
Friends
I would be happy to share my experiences in working with Oracle. Likewise I like to be benefited by others experiences as well. My involvement with Oracle is not limited to just using ADO, but includes PL/SQL, making Oracle packages and interfacing them with ADO.
nageswaragunupudi wrote:Friends
I would be happy to share my experiences in working with Oracle.
These are some examples
oRs:Filter := 'COUNTRY LIKE 'IT%'
oRs:Filter := 'AMOUNT > 1000'
Just a quick note here .. don't forget to clear your filters like this
oRs:Filter := ""
Clearing the filter will re-set the recorset and give you back access to your origional 'fetch'
oRs:Requery() is a useful tool as well as oRs:ReSync(1,2) .. do not leave the resync parameters out .. and you MUST have a 'primary key' set on your table for the Resync method to work.
ReSync is a must in a networked environment especially for workstation update visability... if you use local recordsets ( which I recommend )
Rick Lipkin
nageswaragunupudi wrote:These are some examples
oRs:Filter := 'COUNTRY LIKE 'IT%'
oRs:Filter := 'AMOUNT > 1000'