MAX date in Progress databases
Filed under: Progress | Leave a Comment
Tags: 4gl, abl, code, database, Date, max, openedge, Progress
This is a quick and small tip, but…. very useful.
If u download a podcast in your ipod/iphone… probably some day you’ll remove it.
To remove is easy…
• Go to the podcast you want to delete;
• Instead of selecting it, quickly swipe your finger across to the left or to the right;
• A delete button will appear;
• Delete.
If u have some problem, please… let me know.
update…. it works for e-mail too.
Filed under: iPod | Leave a Comment
Tags: iphone, iPod, podcast, remove
Hi everyone,
If you work with development, you’ll understand me… sometimes, your procedures must have optional params. It’s very common in languages like… VB, Java, C#, Progress ABL, and so on.
In T-Sql isn’t diff, and this is an example of optional params.
It’s just use =NULL in the param…
Proc
–DROP PROC DBO.AAA_TESTE
CREATE PROC DBO.AAA_TESTE
(@NUM1 INTEGER
,@NUM2 INTEGER
,@NUM3 INTEGER = NULL)
AS
IF @NUM3 IS NULL
BEGIN
SELECT @NUM1 + @NUM2
END
ELSE
BEGIN
SELECT @NUM1 + @NUM2 + @NUM3
END
Testing
EXEC AAA_TESTE 1,2
EXEC AAA_TESTE 1,2,1
Both scripts work, with 2 and with 3 params.
That’s all.
Filed under: Sql | Leave a Comment
Tags: code, example, microsoft, null, optional, parameters, Procedure, Server, Sql, T-Sql
Função para remover acentos
Segue um código para remover acentos de strings em progress… bem util.
Código
FUNCTION removeAcento RETURNS CHARACTER (INPUT pChar AS CHARACTER):
DEFINE VARIABLE iPos AS INTEGER NO-UNDO.
DO iPos = 1 TO LENGTH(pChar):
IF CAN-DO(“á,ã,â,à”,SUBSTRING(pChar,iPos,1)) THEN
ASSIGN SUBSTRING(pChar,iPos,1) = “a”.
END.
DO iPos = 1 TO LENGTH(pChar):
IF CAN-DO(“é,ê,è”,SUBSTRING(pChar,iPos,1)) THEN
ASSIGN SUBSTRING(pChar,iPos,1) = “e”.
END.
DO iPos = 1 TO LENGTH(pChar):
IF CAN-DO(“í,î,ì”,SUBSTRING(pChar,iPos,1)) THEN
ASSIGN SUBSTRING(pChar,iPos,1) = “i”.
END.
DO iPos = 1 TO LENGTH(pChar):
IF CAN-DO(“ó,õ,ô,ò”,SUBSTRING(pChar,iPos,1)) THEN
ASSIGN SUBSTRING(pChar,iPos,1) = “o”.
END.
DO iPos = 1 TO LENGTH(pChar):
IF CAN-DO(“ú,û,ù”,SUBSTRING(pChar,iPos,1)) THEN
ASSIGN SUBSTRING(pChar,iPos,1) = “u”.
END.
RETURN UPPER(pChar).
END FUNCTION.
Exemplo
MESSAGE removeAcento(“ÁCÁícáo”) VIEW-AS ALERT-BOX.
vlw
Filed under: Progress | Leave a Comment
Tags: 4gl, abl, acentos, exemplo, Function, openedge, Progress, remover
Setting a HTTP Proxy with Java
If your app access the Internet and you have a http proxy, probably you’ll need to set the proxy in your app.
It’s very simple…
Code
Properties systemSettings = System.getProperties();
systemSettings.put(“http.proxyHost”, “host”);
systemSettings.put(“http.proxyPort”, “port”);
Example
Properties systemSettings = System.getProperties();
systemSettings.put(“http.proxyHost”, “server22″);
systemSettings.put(“http.proxyPort”, “8080″);
see you
Filed under: Java | Leave a Comment
Tags: code, example, host, http, Java, port, proxy, proxyhost, set
OpenEdge 10.2A simple FAQ
OpenEdge 10.2A simple FAQ
Can the OpenEdge Ultra Controls for .NET be used in any development environment?
A. The OpenEdge Ultra Controls for .NET has a restricted license and can only be used within an OpenEdge environment. Customers wishing to use the Infragistics Controls in a non-OpenEdge environment will have to purchase an unrestricted license directly from Infragistics.
The controls can be purchased and installed only if the customer has one of the following OpenEdge products:
• Development:
• OpenEdge Architect
• OpenEdge Studio
• 4GL Development
• OE Development Server
What are the key features of 10.2A?
• OpenEdge GUI for .NET including a new Visual Designer in OpenEdge Architect
• OpenEdge Ultra Controls for .NET (optional product) (see below for additional information)
• OpenEdge Architect usability and performance enhancements
• New OpenEdge Architect XML, XML schema, and WSDL editors, and XPATH helper
• Additional Object Oriented (OO) extensions, garbage collection
• Oracle DataServer CLOB, and both Oracle and Microsoft SQL Server datetime data type support
• Support for Windows Server 2003 (OpenEdge server products)
• Windows Server 2008 64-bit
Filed under: Progress | Leave a Comment
Tags: 10.2a, 4gl, abl, faq, net, openedge, Progress
Alternative to select count(*)
Hi all,
Long time annnh?? lol
This post is about an alternative to select count(*) in Sql Server.
Usually the developers use it to count how many rows exists in a table.
Example
Select count(*) from users
Alternative
SELECT o.NAME,
i.rowcnt
FROM sysindexes AS i
INNER JOIN sysobjects AS o ON i.id = o.id
WHERE i.indid < 2
AND o.NAME = ‘users’
To improve performance…
See u…
Filed under: Sql | Leave a Comment
Tags: alternative, code, count, example, mssql, Performance, Server, Sql, sysindexes, sysobjects, T-Sql, tuning
Working with XML in SQL Server 2000
Unfortunetly sometimes we have to work with old technologies (like mssql 2000).
So, this tip is about how to generate a xml from a select statment.
The big deal is FOR XML clause.
– Basic way to generate the xml
SELECT name
,salary
FROM employe
FOR XML AUTO
– Generates with elements
SELECT name
,salary
FROM employe
FOR XML AUTO, ELEMENTS
– Generates the schema
SELECT name
,salary
FROM employe
FOR XML AUTO, XMLDATA
see ya
Filed under: Sql | Leave a Comment
Tags: 2000, clause, code, example, for, mssql, Server, Sql, xml
Progress changes
Progress changes since 1984
1984 2.1
1984 2.2 R-code
1985 3.0 Overlapping frames, ON & Apply, COLOR
1987 4.0 Worfiles
1988 5.0 Fastrack, Client/Server, SQL89, federated DBs, CHOOSE
1989 6.0 DataServers, EDITING, Parameters
1991 6.3 APW, On-line backup
1991 7.0 GUI, E-D model, TT, UIB, DLL calls, Internal Procedures
1993 7.2 UIB, ODBC
1994 7.3A PP
1995 7.3B
1995 7.3C
1995 8.0A SO/ADM
1996 8.0B spin, directio
1996 8.1A
1997 Webspeed 1.0
1997 7.3E
1997 8.2A AppServer (state aware and state reset), UDF, VST, DB block size
1997 8.2B
1998 Webspeed 2.0
1998 8.2C
1998 8.3A bistall/bithold, more VST
1999 8.3B rereadnolock
1998 9.0A ADM2, PUB/SUB, AppBuilder, dynamic queries, dynamic TT, Async Appserver, stateless mode, OpenClient, type I storage areas
1999 9.0B
1999 9.1A Integrated ABL & Webspeed, dynamic TT, Dynamics, 1st large file support
2000 8.3C
2000 9.1B SQL92
2001 8.3D
2001 9.1C
2002 9.1D
2003 10.0A Webservices IN ans state-free AppServer, ProDataSets, Type II Storage areas
2004 9.1E
2004 10.0B Webservices OUT, ttmarshal, encryption, XML parsing, 64 bit datatypes, DateTime
2005 10.0C
2005 10.1A OOABL
2007 10.1B Major removing of limits on DBl, double colon notation
2008 10.1C Client stack trace VST
2009 10.2A ABL GUI for .NET, Windows 64bit
Filed under: Progress | Leave a Comment
Tags: 4gl, abl, changes, openedge, Progress

T-SQL – Finding strings in procs and triggers
Hi all,
This post is about how to find a STRING in stored procedures and triggers.
This tip is VERY useful for those who works with T-SQL.
code
select distinct(object_name(id)) from syscomments
where
text like ‘%string%’
example
select distinct(object_name(id)) from syscomments
where
text like ‘%mytable%’
see ya
Filed under: Sql | Leave a Comment
Tags: example, id, Like, microsoft, mssql, object_name, Procedure, Server, Sql, Stored, String, syscomments, T-Sql, Trigger