Thursday, 30 May 2013

Insert excel data into MySql Table






1. First save the data in excel file in the .csv format.
2. For example execute a select query that returns more than 100 rows. And there is export option in result panel. Using that export as CSV file format.

From that file execute the below line to insert.
 
 LOAD DATA LOCAL INFILE 'C:\\temp\\dlyhdr.csv' INTO TABLE tt.dailystockheader
 FIELDS TERMINATED BY '\t'
 ENCLOSED BY '' LINES TERMINATED BY '\n' ;
 

Then select that table whether data has inserted or not.

Saturday, 18 May 2013

Fail to access iis metabase


You need to install the .net framework on you system

Open visual studio command prompt and type this command

aspnet_regiis -ga <UserName>
   example aspnet_regiis -ga \aspnet
if this doesn'twork than use this command

aspnet_regiis -i
 
alternatively you can copy and paste this command into windows command prompt

%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
 
this will fix your problem

Monday, 6 May 2013

how to determine 32 bit or 64 bit in vb6 or Visual Basic 6

Private Function Registry_Read(Key_Path, Key_Name) As Variant
      On Error Resume Next
       Dim Registry As Object
       Set Registry = CreateObject("WScript.Shell")
       Registry_Read = Registry.RegRead(Key_Path & Key_Name)
   End Function

' This  function read the value from registry editor

Private Sub Test()
    'Type-1
     MsgBox Registry_Read("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows  \CurrentVersion\", "ProgramFilesDir (x86)")
    'if 64 bit it will return the path name
    'if 32bit  , it will return empty string
    'from this we can identify 32 bit or 64 bit.

   
   
    'Type-2
           Dim sak As String
     sak = Registry_Read("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\", "Identifier")
     If InStr(1, sak , "64") Then
        MsgBox "Its 64 bit version !", vbInformation, "BASE"
       ' Write code as you want
     ElseIf InStr(1,sak , "x86") Then
        MsgBox "Its 32 bit version !", vbInformation, "BASE"
             ' Write code as you want
     End If
End Sub


Call the Test function. For example call the test function in Form Load event! with your own risk
I was collected this information in webpages!

Change the Default file location for SQL BackUp

Find the Key in regedit.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.SQLEXPRESSR2\MSSQLServer.

On Right side , Find the BackupDirectory string value. Edit the value as you want.

Try it own risk!.