Jumat, 11 April 2008
icecast
i found that icecast was very cool, under opensource license. just install icecast, oddcast and winamp, we can have our own ip based radio. cool.....
here's the link
here's the link
Labels:
icecast,
mp3 stream server,
oddcast,
opensource,
radio
Selasa, 15 Januari 2008
SQL SERVER QUERY FROM 2 DATABASE
this sql query should return records from tables in 2 or more database. it's quite simple just put the database name in front of the table you want to display/query.
SELECT <db1>.<table1>.*, <db2>.<table2> FROM
<db1> LEFT OUTER JOIN <db2>
ON <db1>.<table1>.<key1> = <db2>.<table2>.<key2>
it's easy
Sabtu, 16 Juni 2007
Limit Pop3 in domino to download only certain email
this will avoid to download all email from your inbox with the domino server.
modify the ($POP3) view and put this into View Selection:
DEFAULT DeliveredDate := "";
SELECT DeliveredDate > @Adjust(@Now;0;0;-3;0;0;0);
this, will return sets of email delivered in the last 2 days based on formula.
or you can modify the DeliveredDate with @Adjust formula to match with your requirement.
easy. but it works and help us to download only today / range of date.
Senin, 05 Maret 2007
VB version of DBLOOKUP/DBCOLUMN
this the VB version of DBLOOKUP and DBCOLUMN:
Function SQL_GETTABLEDATA(ByVal f_Table As String, ByVal f_RetCol As String, ByVal f_KeyCol As String, ByVal f_KeyVal As String, ByVal b_KeyNumeric As Boolean, Optional bDISTINCT As Boolean = True) As String
On Error GoTo errSQL_GetTableData
SQL_GETTABLEDATA = ""
Set SQL_Res_Temp = Nothing
Set SQL_Res_Temp = New ADODB.Recordset
SQL_Res_Temp.CursorLocation = adUseClient
If f_KeyCol <> "" And f_KeyVal <> "" Then
's_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & f_Table & _
"] Where cstr([" & f_Table & "].[" & f_KeyCol & "])=" & _
IIf(b_KeyNumeric, "", "'") & cADO.ValidateStringForSQL(f_KeyVal) & _
IIf(b_KeyNumeric, "", "'") & ";"
s_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & _
f_Table & "] Where CONVERT(VARCHAR(255),[" & f_Table & "].[" & f_KeyCol & "])=" & _
IIf(b_KeyNumeric, "", "'") & cADO.ValidateStringForSQL(f_KeyVal) & _
IIf(b_KeyNumeric, "", "'") & ";"
Else
s_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & f_Table & _
"];"
End If
SQL_ErrInit
If cADO.ExecuteSQL(s_SQL, , , , , SQLRecAff, SQLRecCnt, SQLErrNum, SQLErrDesc, SQL_Res_Temp) = False Then
GoTo doneSQL_GetTableData
End If
With SQL_Res_Temp
If SQLRecCnt < 1 Then GoTo doneSQL_GetTableData
SQL_GETTABLEDATA = IsNullEx(SQL_Res_Temp.Fields(0).Value, "")
End With
doneSQL_GetTableData:
If Not (SQL_Res_Temp Is Nothing) Then
If SQL_Res_Temp.State = 1 Then SQL_Res_Temp.Close
End If
Set SQL_Res_Temp = Nothing
Exit Function
errSQL_GetTableData:
SQL_GETTABLEDATA = ""
Err.Clear
Resume doneSQL_GetTableData
End Function
Function SQL_GETTABLEDATA(ByVal f_Table As String, ByVal f_RetCol As String, ByVal f_KeyCol As String, ByVal f_KeyVal As String, ByVal b_KeyNumeric As Boolean, Optional bDISTINCT As Boolean = True) As String
On Error GoTo errSQL_GetTableData
SQL_GETTABLEDATA = ""
Set SQL_Res_Temp = Nothing
Set SQL_Res_Temp = New ADODB.Recordset
SQL_Res_Temp.CursorLocation = adUseClient
If f_KeyCol <> "" And f_KeyVal <> "" Then
's_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & f_Table & _
"] Where cstr([" & f_Table & "].[" & f_KeyCol & "])=" & _
IIf(b_KeyNumeric, "", "'") & cADO.ValidateStringForSQL(f_KeyVal) & _
IIf(b_KeyNumeric, "", "'") & ";"
s_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & _
f_Table & "] Where CONVERT(VARCHAR(255),[" & f_Table & "].[" & f_KeyCol & "])=" & _
IIf(b_KeyNumeric, "", "'") & cADO.ValidateStringForSQL(f_KeyVal) & _
IIf(b_KeyNumeric, "", "'") & ";"
Else
s_SQL = "Select " & IIf(bDISTINCT, "DISTINCT", "") & " [" & f_Table & "].[" & f_RetCol & "] from [" & f_Table & _
"];"
End If
SQL_ErrInit
If cADO.ExecuteSQL(s_SQL, , , , , SQLRecAff, SQLRecCnt, SQLErrNum, SQLErrDesc, SQL_Res_Temp) = False Then
GoTo doneSQL_GetTableData
End If
With SQL_Res_Temp
If SQLRecCnt < 1 Then GoTo doneSQL_GetTableData
SQL_GETTABLEDATA = IsNullEx(SQL_Res_Temp.Fields(0).Value, "")
End With
doneSQL_GetTableData:
If Not (SQL_Res_Temp Is Nothing) Then
If SQL_Res_Temp.State = 1 Then SQL_Res_Temp.Close
End If
Set SQL_Res_Temp = Nothing
Exit Function
errSQL_GetTableData:
SQL_GETTABLEDATA = ""
Err.Clear
Resume doneSQL_GetTableData
End Function
Langganan:
Postingan (Atom)