Blog from a software professional, Passionate to work in latest cutting edge technologies in order to get better results in business.
Sunday, April 4, 2010
How to Find you Black Berry PIN number
I was trying to find the BB PIN number and found the content from a article:
Type ALT CAP H on your BlackBerry keyboard and a screen will show up showing you your PIN, your IMEI number (International Mobile Equipment Identity), signal strength and battery levels etc...
Resource: http://crackberry.com/quick-way-find-your-pin
Hope it helps
4Z
Thursday, April 1, 2010
xp_sendmail: Procedure expects parameter @user, which was not supplied.
When you try to send E-mail from your SQL Server 2005 T-SQL with xp_sendmail, there will be an error message shown as follows:
xp_sendmail: Procedure expects parameter @user, which was not supplied.
And probably when you try to pass @user also, it will say invalid parameter.
It seems in SQL Server 2005, xp_sendmail is obsolete and we can use sp_send_dbmail instead.
Following is the syntax:
EXEC msdb.dbo.sp_send_dbmail
@recipients='vm.mohammedfauzi@gmail.com',
@subject = 'SQL:DataBase Mail Test',
@body = 'Hello Test From SQL.Hello Test From SQL.',
@profile_name = 'The Profile you created in Configure Database Mail',
@body_format = 'HTML'
The following link has screen shots to setup Email Profile in SQL Server : Click Here
Hope it helps
Fauzi
Thursday, March 25, 2010
MOSS: Where to place generic Javascript in MOSS Server
(writing on demand from Mr.Murthu Buddy :))
When you need to use a javascipt in your html page in MOSS Sharepoint.
you can place the Javascript file in the following location:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\js\mootools-1.2-core.js
and in your HTML file, you can refer it like:
<script type="text/javascript" src="http://portal/_layouts/js/mootools-1.2-core.js">script>
Hope it Helpz
Tuesday, March 23, 2010
Hosting the InfoPath 2007 Form Editing Environment in a Web Form
The Link is very useful to create a web form display infopath form
Hosting the InfoPath 2007 Form Editing Environment in a Custom Web Form
Regards
Fauzi
Sunday, March 14, 2010
Automated Blog
These days couldn't find enough time to blog...
So developed an automated blog!
Please view and feel free to share your thoughts...
www.KuwaitFresh.com
Best Regards
Fauzi
Wednesday, December 9, 2009
Convert DataReader To DataSet through C# Dynamically
I was writing an application to read data from AS 400, Db2, based on the data I have to generate a report. I was trying to covert OdbcDataReader to DataSet. The following Code was helpful to do the same... We can use it for SqlDataReader as well.
Code:
public DataSet ConvertDataReaderToDataSet(System.Data.Odbc.OdbcDataReader reader)
{
DataSet dataSet = new DataSet();
do
{
// Create data table in runtime
DataTable schemaTable = reader.GetSchemaTable();
DataTable dataTable = new DataTable();
if (schemaTable != null)
{
for (int i = 0; i < schemaTable.Rows.Count; i++)
{
DataRow dataRow = schemaTable.Rows[i];
// Create a column name as provided in Schema
string columnName = (string)dataRow["ColumnName"];
// Define Column Type here
DataColumn column = new DataColumn(columnName, (Type)dataRow["DataType"]);
//Adding Column to table
dataTable.Columns.Add(column);
}
dataSet.Tables.Add(dataTable);
// Fill the data table from reader data
while (reader.Read())
{
DataRow dataRow = dataTable.NewRow();
for (int i = 0; i < reader.FieldCount; i++)
dataRow[i] = reader.GetValue(i);
dataTable.Rows.Add(dataRow);
}
}
else
{
// No records were returned
DataColumn column = new DataColumn("RowsAffected");
dataTable.Columns.Add(column);
dataSet.Tables.Add(dataTable);
DataRow dataRow = dataTable.NewRow();
dataRow[0] = reader.RecordsAffected;
dataTable.Rows.Add(dataRow);
}
}
while (reader.NextResult());
return dataSet;
}
Hope It Helpzzzz
4ZZZZ
Monday, December 7, 2009
Infopath System.Security. Permissions.EnvironmentPermission Fulltrust
When I tried to get current user in code behind in the infopath form, the following security exception occurred. The solution is we need to set Full trust for the Form.
Code used: nav.SelectSingleNode("//my:Myfield", NamespaceManager).SetValue(System.Environment.UserName);
Exception Message:
Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Environment.get_UserName() at ItemCreation.FormCode.FormEvents_Loading(Object sender, LoadingEventArgs e) at Microsoft.Office.InfoPath.Server.SolutionLifetime.FormEventsHost.<>c__DisplayClass6.<>c__DisplayClass8.
00400000100010083EF9CF1283A631F1C2513A36EA356E01870A92F21E61D5D53
1420B2C3905A6E3F8A0BD9E2BFAD3EAB3362877D233232ED1AE4836A1C51EAA7
717A16047A0F6F6E589F8689BCC5A15A20211252DB101B889228C5E15A3D49DC
2E112650853F16A85DD01652057E5D2CE7A41B01AA56576FFED4B4567FD8367
EE777C222C590E6" Name="ItemCreation" AssemblyVersion="1.0.3628.18207"/>
How to set Permission: In Tools -> Form Options -> Security & trust -> Full Trust & Publish
Hope it Helpz
Thanks & Regards
Fauzi ~ 4Z