Friday, October 27, 2017

The module vsflex7l.ocx failed to load in Windows10 64-bit computer

If you are getting error of The module vsflex7l.ocx failed to load  because it was put in the wrong folder. I assume most of you placed the .ocx in the System32 folder. But if you are using Vista and/or Win7 64-bit, the .ocx must be placed in the SysWOW64 folder instead, which, just so happens to be right next to the System32 folder.
Now follow the same instructions, but simply change to the corresponding path in the CMD.

1) Move vsflex7l.ocx to c:\Windows\SysWOW64
2) Open a command line window and run following command:
    regsvr32 c:\Windows\SysWOW64\vsflex7l.ocx
b) For Vista/Win7 users with UAC turn on, the above command needs to be run from elevated command prompt.
Once vsflex7l is registered successfully, following message will prompt: "DllRegisterServer in C:\WINDOWS\SysWOW64\vsflex7l.ocx succeeded."
Now launch the application again and you should not see the file missing error.

Monday, November 28, 2016

SQL First Date and Last date of current month

To get first date of current month use below sql query :

select  CAST(DATEADD(dd,-(DAY(getDate())-1),getDate()) as date) ,'First Date of current Month'
union
CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getDate()))),'Last day of Current month'

Monday, January 12, 2015

On button click webpage reload using javascript

In javascript, reload() function is used to reload web page. The reload() method does the same as the reload button in your browser.

 By default, the reload() method reloads from the cache, but by you can force the the reload to get the page from server by setting the forceGet parameter to true: location.reload(true).

example : <input type="button" onclick="location.reload()">

Sunday, October 5, 2014

PHP Fatal error: Call to undefined function session_register()

session_register() has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

Your facing this problem because of you are using PHP 5.4.0 or above

Read PHP documentation
http://www.php.net/manual/en/function.session-register.php


For solution : Remove  session_register() from you code.

Tuesday, August 12, 2014

Select data beween two row number of result set (LIMIT IN MSSQL)

In MYSQL, LIMIT  clause is used to select records from the beginning, middle and end of a result set.
The LIMIT clause accepts one or two arguments. The values of both arguments must be zero or positive integer constants.

Select * from Tablename LIMIT offset,count

Here offset specifies the offset of the first row to return and count specifies maximum number of rows to return.

But in MSSQL it can get different way. TOP Clause is used to specify the number of records to return.

SELECT TOP number|percent columnname(s)
FROM tablename


MSSQL SERVER Does not support LIMIT clause. You can implement it in different way. Suppose you want to select rows between 6 to 10, you should try below MSSQL query

SELECT * FROM (
  SELECT *, ROW_NUMBER() OVER (ORDER BY table_column) as row FROM Tablename
 ) a WHERE row > 5 and row <= 10


 

Saturday, June 28, 2014

India date and time in php

India date & time can get by setting indian zone and using date function of php. Use Below code

<?php

date_default_timezone_set('Asia/Calcutta');
echo date("H:i");
echo date("d-M-Y");

?>

Friday, June 27, 2014

How to get two date which in varchar type is equal are not in PHP

Suppose we have two date field or two date from SQL result and we want to find out if the eual or not, then you can try below cod code
if ( strtotime($date1) == strtotime($date2) )
{
 echo "date is equal";
}