18 jan 2012
webdav in sharepoint 2010
http://support.sherweb.com/Faqs/Show/how-to-connect-to-a-sharepoint-site-using-webdav-sharepoint-2010
you can get the same view if you click the library tab and then click on the small button on the right
you can get the same view if you click the library tab and then click on the small button on the right
11 jan 2012
trigger to update timestamp in an sql table
USE [DatabaseName]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[updateLastEditTime]
ON [dbo].[LogonLog]
FOR UPDATE, INSERT
AS
UPDATE LogonLog SET [timestamp] = CURRENT_TIMESTAMP
FROM LogonLog Inner Join Inserted On
LogonLog.username = Inserted.username
and LogonLog.computername = Inserted.computername
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[updateLastEditTime]
ON [dbo].[LogonLog]
FOR UPDATE, INSERT
AS
UPDATE LogonLog SET [timestamp] = CURRENT_TIMESTAMP
FROM LogonLog Inner Join Inserted On
LogonLog.username = Inserted.username
and LogonLog.computername = Inserted.computername
7 dec 2011
convert object to insert query or Create table statement
Okey I know, the code represented here is not the code that you want to use for the CRUD in an ERP system. bud sometimes things need to go fast.
example
string insertquery = Myobject.ToSqlQuery();
put these functions in a public static class file:
public static string ToSqlQuery(this T primary)
{
int counter = 0;
string Columnstatement = "INSERT INTO " + typeof(T).Name + " (";
string ValueStatement = " VALUES ( ";
foreach (var pi in typeof(T).GetProperties())
{
string priValue = string.Empty;
PropertyInfo pil = (PropertyInfo)pi;
try
{
priValue = pi.GetGetMethod().Invoke(primary, null).ToString();
}
catch (Exception)
{
}
if (priValue != string.Empty)
{
if (counter > 0)
{
ValueStatement += ",";
Columnstatement += ",";
}
Columnstatement += "[" + pil.Name + "]";
ValueStatement += "'" + priValue + "'";
counter++;
}
}
return Columnstatement + ") " + ValueStatement + ")";
}
public static string ToSqlCreateTable(this T primary)
{
int counter = 0;
string Columnstatement = "CREATE TABLE " + "TABLENAME (";
string ValueStatement = "VALUES ( ";
foreach (var pi in typeof(T).GetProperties())
{
PropertyInfo pil = (PropertyInfo)pi;
if (counter > 0)
{
Columnstatement += ",";
}
Columnstatement += "[" + pil.Name + "]" + " VARCHAR(254)";
counter++;
}
Columnstatement += ")";
return Columnstatement;
}
example
string insertquery = Myobject.ToSqlQuery();
put these functions in a public static class file:
public static string ToSqlQuery
{
int counter = 0;
string Columnstatement = "INSERT INTO " + typeof(T).Name + " (";
string ValueStatement = " VALUES ( ";
foreach (var pi in typeof(T).GetProperties())
{
string priValue = string.Empty;
PropertyInfo pil = (PropertyInfo)pi;
try
{
priValue = pi.GetGetMethod().Invoke(primary, null).ToString();
}
catch (Exception)
{
}
if (priValue != string.Empty)
{
if (counter > 0)
{
ValueStatement += ",";
Columnstatement += ",";
}
Columnstatement += "[" + pil.Name + "]";
ValueStatement += "'" + priValue + "'";
counter++;
}
}
return Columnstatement + ") " + ValueStatement + ")";
}
public static string ToSqlCreateTable
{
int counter = 0;
string Columnstatement = "CREATE TABLE " + "TABLENAME (";
string ValueStatement = "VALUES ( ";
foreach (var pi in typeof(T).GetProperties())
{
PropertyInfo pil = (PropertyInfo)pi;
if (counter > 0)
{
Columnstatement += ",";
}
Columnstatement += "[" + pil.Name + "]" + " VARCHAR(254)";
counter++;
}
Columnstatement += ")";
return Columnstatement;
}
6 dec 2011
recovering from a disconnected citrix session
when a user is disconnected from a citrix session, its difficult to connect back to the same session.
first set all other citrix servers "log on to this server" off.
and let the user login again. with some luck it will connecting to the right connection
if this doesnt work open the profile of the user and look for the xar file for excel file recovery
Drive:\Documents and Settings\user_name\Application Data\Microsoft\Excel
first set all other citrix servers "log on to this server" off.
and let the user login again. with some luck it will connecting to the right connection
if this doesnt work open the profile of the user and look for the xar file for excel file recovery
Drive:\Documents and Settings\user_name\Application Data\Microsoft\Excel
2 dec 2011
windows xp : wrong routing with pptp VPN
- Start => run => regedit
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage\
- open the element "Bind"
- place the value "\Device\NdisWanIp" and copy this on the top of the list.
Abonneren op:
Posts (Atom)