SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME="procedure name" AND ROUTINE_SCHEMA="dbname";
Monday, 24 August 2015
store processior in my sql
DELIMITER //
create procedure duplicat(IN stName longtext,IN stmobile longtext,IN stfather longtext,IN stemail longtext)
begin
Select Auto_No from tblname where Data_As_Duplicate is null and ucase(Student_Name_AlphabetShort)=stName and (studentMobileNumber=stmobile or lcase(studentEmailID)=stemail ) and ucase(Parent_Name_AlphabetShort)=stfather order by Auto_No ;
end//
DELIMITER ;
call duplicat('nishant', '7503485910','sdk','nishant70417@live.com')
create procedure duplicat(IN stName longtext,IN stmobile longtext,IN stfather longtext,IN stemail longtext)
begin
Select Auto_No from tblname where Data_As_Duplicate is null and ucase(Student_Name_AlphabetShort)=stName and (studentMobileNumber=stmobile or lcase(studentEmailID)=stemail ) and ucase(Parent_Name_AlphabetShort)=stfather order by Auto_No ;
end//
DELIMITER ;
call duplicat('nishant', '7503485910','sdk','nishant70417@live.com')
Thursday, 13 August 2015
How to Set background color of Combobox item in vb.net
'Set the Combobox's DrawMode property to OwnerDrawVariable
Dim ColorName As String
For Each ColorName In System.Enum.GetNames(GetType(System.Drawing.KnownColor))
ComboBox1.Items.Add(Color.FromName(ColorName))
Next
End Sub
'The above code will load the known color names, and then adds Color objects to the combobox's Items collection.
'Next, let's add our MeasureItem sub ( for the combobox ) :
Protected Sub Combobox1_MeasureItem(ByVal sender As Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles ComboBox1.MeasureItem
Dim myRandom As New Random
e.ItemHeight = myRandom.Next(20, 20)
End Sub
'This, will call the overloaded Random.Next method to get the next random number between 20 and 40, and assign that to the ItemHeight property of the MeasureItemEventArgs parameter.
'Last step, add the DrawItem event :
Protected Sub Combobox1_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ComboBox1.DrawItem
If e.Index < 0 Then
e.DrawBackground()
e.DrawFocusRectangle()
Exit Sub
End If
' Get the Color object from the Items list
Dim CurrentColor As Color = CType(ComboBox1.Items(e.Index), Color)
' get a square using the bounds height
Dim SizeRect As Rectangle = New Rectangle(2, e.Bounds.Top + 2, e.Bounds.Width, e.Bounds.Height - 2)
Dim ComboBrush As Brush
' call these methods first
e.DrawBackground()
e.DrawFocusRectangle()
' change brush color if item is selected
If e.State = Windows.Forms.DrawItemState.Selected Then
ComboBrush = Brushes.White
Else
ComboBrush = Brushes.Black
End If
' draw a rectangle and fill it
e.Graphics.DrawRectangle(New Pen(CurrentColor), SizeRect)
e.Graphics.FillRectangle(New SolidBrush(CurrentColor), SizeRect)
' draw a border
SizeRect.Inflate(1, 1)
e.Graphics.DrawRectangle(Pens.Black, SizeRect)
' draw the Color name
e.Graphics.DrawString(CurrentColor.Name, ComboBox1.Font, ComboBrush, e.Bounds.Height + 5, ((e.Bounds.Height - ComboBox1.Font.Height) \ 2) + e.Bounds.Top)
End Sub
Friday, 7 August 2015
How To Convert database to UTF8 in my sql
alter table TABLE_NAME CONVERT TO character SET utf8 collate UTF8_BIN
Wednesday, 5 August 2015
MySQL Stored Procedure
DELIMITER //
CREATE PROCEDURE aff2_2015
(IN con longtext, IN mob bigint)
BEGIN
SELECT * FROM affidavitdata_2015
WHERE studentFirstName = con and studentmobilenumber=mob;
END //
DELIMITER ;
CALL aff2_2015('nishant','7503485910');
CREATE PROCEDURE aff2_2015
(IN con longtext, IN mob bigint)
BEGIN
SELECT * FROM affidavitdata_2015
WHERE studentFirstName = con and studentmobilenumber=mob;
END //
DELIMITER ;
CALL aff2_2015('nishant','7503485910');
How create setup file in vb.net
2) Goto 'Other Project Types' and 'Setup and Development'.
3) Choose 'Setup Project'.
4) In the 'Solution Explorer' rightclick on your setup
project.
5) Choose 'Properties'.
6) Click 'Prerequisites...' button.
7) Choose your prerequisites (e.g. .NET Framework, Windows
Installer).
8) Press 'OK', press 'Apply'.
9) Rightclick on 'Application Folder' in the left File
System window.
10) Choose 'Add' -> 'Project Output'
11) When done, rightclick in the Right File System window.
12) Choose 'Add' and whatever you want to add to the
application directory
during installation.
13) Rightclick on 'Project output from ....'
14) Select 'Create shorcut to Primary output from ...'
15) Rightclick on 'Shorcut to Primary output from...'
16) Choose 'Rename'
17) Name it after your application.
18) Select it and drag it to the left to 'User's Program
Menu'.
19) (Build solution) Build your setup project.
20) In the setup project directory you'll find the .exe and
.msi file to
install your application.
String Abribiation in vb.net
Function colldbabrivatename(ByVal sstring As String) As String
sstring = Replace(sstring, " ", "")
sstring = Trim(sstring)
Dim abribiatedata = Split(sstring, Space(1))
If UBound(abribiatedata) > 0 Then
Dim abribiateform As String = ""
For i As Integer = LBound(abribiatedata) To UBound(abribiatedata)
If abribiatedata(i).Substring(0, 1) = "[" Or abribiatedata(i).Substring(0, 1) = "(" Then Exit For
If Len(abribiatedata(i)) > 1 Then
If abribiateform = "" Then
abribiateform = abribiatedata(i).Substring(0, 1)
abribiateform1 = abribiatedata(i).Substring(0, 1)
Else
abribiateform = abribiateform & "" & abribiatedata(i).Substring(0, 1)
abribiateform1 = abribiateform1 & " " & abribiatedata(i).Substring(0, 1)
End If
Else
If abribiateform = "" Then
abribiateform = abribiatedata(i)
abribiateform1 = abribiatedata(i)
Else
abribiateform = abribiateform & "" & abribiatedata(i)
abribiateform1 = abribiateform1 & " " & abribiatedata(i)
End If
End If
Next
sstring = abribiateform
End If
colldbabrivatename = sstring
End Functio
sstring = Replace(sstring, " ", "")
sstring = Trim(sstring)
Dim abribiatedata = Split(sstring, Space(1))
If UBound(abribiatedata) > 0 Then
Dim abribiateform As String = ""
For i As Integer = LBound(abribiatedata) To UBound(abribiatedata)
If abribiatedata(i).Substring(0, 1) = "[" Or abribiatedata(i).Substring(0, 1) = "(" Then Exit For
If Len(abribiatedata(i)) > 1 Then
If abribiateform = "" Then
abribiateform = abribiatedata(i).Substring(0, 1)
abribiateform1 = abribiatedata(i).Substring(0, 1)
Else
abribiateform = abribiateform & "" & abribiatedata(i).Substring(0, 1)
abribiateform1 = abribiateform1 & " " & abribiatedata(i).Substring(0, 1)
End If
Else
If abribiateform = "" Then
abribiateform = abribiatedata(i)
abribiateform1 = abribiatedata(i)
Else
abribiateform = abribiateform & "" & abribiatedata(i)
abribiateform1 = abribiateform1 & " " & abribiatedata(i)
End If
End If
Next
sstring = abribiateform
End If
colldbabrivatename = sstring
End Functio
Subscribe to:
Posts (Atom)

