Question about SQL
- cdmmaui
- Posts: 653
- Joined: Fri Oct 28, 2005 9:53 am
- Location: The Woodlands - Dallas - Scottsdale - London
- Contact:
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!
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!
- Manuel Valdenebro
- Posts: 706
- Joined: Thu Oct 06, 2005 9:57 pm
- Location: Málaga-España
Rick,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
I am using that code (Thanks to RF) with Oracle DB successfully. But with table (dbf) i was using "oLbx:nClrPane:={|| IIF((oLbx:cAlias)->(OrdKeyNo())%2==0,CLR_LGREEN,CLR_LGRAY)}" for changing rows colors and now i can not using with array. Do you know how i can doing?
Regards
Un saludo
Manuel
Manuel
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Please try
Code: Select all
oLbx:nClrPane:={|| IIF(oRs:AbsolutePisition % 2==0,CLR_LGREEN,CLR_LGRAY)}
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
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 )
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 )
- Manuel Valdenebro
- Posts: 706
- Joined: Thu Oct 06, 2005 9:57 pm
- Location: Málaga-España
Thank very much Nageswara. Now all it is ok.nageswaragunupudi wrote:Please tryCode: Select all
oLbx:nClrPane:={|| IIF(oRs:AbsolutePosition % 2==0,CLR_LGREEN,CLR_LGRAY)}
Un saludo
Manuel
Manuel
Rick,Rick Lipkin wrote:
I wrote a thread on the subject with samples:
http://fivetechsoft.com/forums/viewtopi ... &highlight
I put an entry based on your ADO article in the wiki at this section
- Manuel Valdenebro
- Posts: 706
- Joined: Thu Oct 06, 2005 9:57 pm
- Location: Málaga-España
Rick thanks.Rick Lipkin wrote:Manuel
Try this code based on a specific fields in your table .. the colors are based on dates in each row..
I had seen now we are seven FW-Oracle ( You, Metaldrummer (Chile), NageswaRao (India), tnhoe (Malasya), BielEA6DD, Baxajaun and I from Spain. I believe we must work together to develope this marvellous tools, (now free in Express version) and help new friends would like to work with FW + Oracle.
Happy New Year.
Un saludo
Manuel
Manuel
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
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
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
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
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.
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.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Manuel Valdenebro
- Posts: 706
- Joined: Thu Oct 06, 2005 9:57 pm
- Location: Málaga-España
Thanks Nageswara.nageswaragunupudi wrote:Friends
I would be happy to share my experiences in working with Oracle.
Actually, I am using oRecordSet:Find() successfully in a browse, but when I try to use oRecordSet:Filter I received an error.
Do you know if we can use oRs:FILTER with ADO/ORACLE?
On next 8th January, I will begin a PL course. I hope interchange experiences with you.
Regards
Un saludo
Manuel
Manuel
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
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
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
- Manuel Valdenebro
- Posts: 706
- Joined: Thu Oct 06, 2005 9:57 pm
- Location: Málaga-España