Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Muhammad Javed Khan

@Muhammad Javed Khan
About
Posts
10
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using Flexgrid .net
    M Muhammad Javed Khan

    First confirm that gird should have 10 rows and start the loop with 1 may be grid index starts from 1..... For intCount = 1 To 10 'Start with 1 instead of 0 grid1.Cell(0, intCount).Text = "Hello" Next Regards

    Visual Basic help csharp database data-structures announcement

  • select top 50
    M Muhammad Javed Khan

    Try this "SELECT TOP 50 U.strName , (Select Count(*) From tbUser) as TotalRecords " + "FROM tbUser U " + "WHERE U.strName LIKE '%om%' " Regards

    Database database sql-server sysadmin

  • about using barcode?
    M Muhammad Javed Khan

    I had made an application in VB 6 in which i used Bar Code. I printed the barcode on the Employee Card. You dun have to do any thing there are fonts available throug which u can make bar code. e.g. if u have a report in which u want to have barcode just chage the font of the field the barcode will be displayed. and for reading barcode u dun have to code when bar code reader will read the bar code a text(against which bar code was generated) will be available where the cursor will be blinking. u can search bar code font on net these are free just install these and use Regards...

    Visual Basic csharp question

  • How To Check if update statement is executed successfully (qry.ExecuteScalar)
    M Muhammad Javed Khan

    ExecuteNonQuery it returns no of rows effected by the query. use this: Dim dr As OleDbDataReader Dim qry As New OleDbCommand Dim ucon As New OleDbConnection Dim inssql As String dim iNoofRows as interger inssql = "Update PriceTable set Price = " & newprice & " where ID = '" & id1 & "' and Period = '" & Trim(period) & "'" qry = New OleDbCommand(inssql, ucon) **iNoofRows = qry.ExecuteNonQuery 'Instead of qry.ExecuteScalar**

    Visual Basic csharp database regex tutorial

  • Entering Items in Combo
    M Muhammad Javed Khan

    Hello All I want to manually enter items in the combox as: cbo.Items.Add("Supplier") cbo.Items.Add("Customer") How i can add ValueMember Field data manually? As we have an option in VB6 as: cbo.AddItem ("Supplier") cbo.ItemData(cbo.NewIndex) = 1 'How this can be done in VB.Net? cbo.AddItem ("Customer") cbo.ItemData(cbo.NewIndex) = 2 'How this can be done in VB.Net? ''''''''''' I have done this way is there any solution better than this? '' Dim lDT As New DataTable Dim col As DataColumn Dim row As DataRow col = New DataColumn col.ColumnName = "PartyClassType" lDT.Columns.Add(col) col = New DataColumn col.ColumnName = "PartyClassTypeID" lDT.Columns.Add(col) row = lDT.NewRow row(0) = "Supplier" row(1) = "S" lDT.Rows.Add(row) row = lDT.NewRow row(0) = "Customer" row(1) = "C" lDT.Rows.Add(row) With cbo .DisplayMember = "PartyClassType" .ValueMember = "PartyClassTypeID" .DataSource = lDT End With Regards

    Visual Basic csharp sales question

  • procedure and datetime
    M Muhammad Javed Khan

    You have to concatenate " ' " to dates.... alter PROCEDURE SP_PHIEUNHAP_Search ( @FromNgayNhap datetime, @ToNgayNhap datetime, @CheckNgayNhap bit, @MaNCC int, @FromNgayLap datetime, @ToNgayLap datetime, @CheckNgayLap bit, @NguoiLap int ) AS DECLARE @sql nvarchar(500) DECLARE @flag bit declare @tungay datetime declare @denngay datetime SELECT @sql = ' select MaPN, NgayNhap, TenNCC, NgayLap, HoTen, TongTien ' SELECT @sql = @sql + ' from PHIEUNHAP, NHACUNGCAP, NGUOIDUNG ' if (@CheckNgayNhap = 1 ) begin SELECT @sql = @sql + ' where NgayNhap >= ''' + CONVERT(NVARCHAR, @FromNgayNhap,111) + ''' and NgayNhap <= ''' + CONVERT(NVARCHAR, @ToNgayNhap,111) + '''' set @flag = 1 end if(@CheckNgayLap = 1) begin if(@flag = 1) SELECT @sql = @sql + ' and NgayLap >= ''' + CONVERT(NVARCHAR,@FromNgayLap) + ' and NgayLap <= ' + CONVERT(NVARCHAR, @ToNgayLap,111) + '''' else SELECT @sql = @sql + ' where NgayLap >= ''' + CONVERT(NVARCHAR,@FromNgayLap) + ' and NgayLap <= ' + CONVERT(NVARCHAR, @ToNgayLap,111) + '''' set @flag = 1 end if(@NguoiLap != -1) begin if(@flag = 1) SELECT @sql = @sql + ' and NguoiLap = ' + CONVERT(NVARCHAR, @NguoiLap) else SELECT @sql = @sql + ' where NguoiLap = ' + CONVERT(NVARCHAR, @NguoiLap) set @flag = 1 end if(@MaNCC != -1) begin if(@flag = 1) SELECT @sql = @sql + ' and PHIEUNHAP.MaNCC = ' + CONVERT(NVARCHAR, @MaNCC) else SELECT @sql = @sql + ' where PHIEUNHAP.MaNCC = ' + CONVERT(NVARCHAR, @MaNCC) set @flag = 1 end SELECT @sql = @sql + ' and NguoiLap = MaND and PHIEUNHAP.MaNCC = NHACUNGCAP.MaNCC ' EXEC sp_executesql @sql :suss:

    Database sharepoint database help

  • Mutiple Selected Listbox
    M Muhammad Javed Khan

    'Declare a form level variable as Inherits System.Windows.Forms.Form Private lstLastItem As Integer 'Move the index of selected item of list box into the lstLastItem Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged lstLastItem = ListBox1.SelectedIndex End Sub lstLastItem will contain the last index if u want to access the last selected item u may access it as MsgBox(ListBox1.Items.Item(lstLastItem))

    Visual Basic question lounge

  • Mutiple Selected Listbox
    M Muhammad Javed Khan

    'Declare a form level variable as Inherits System.Windows.Forms.Form Private lstLastItem As Integer 'Move the index of selected item of list box into the lstLastItem Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged lstLastItem = ListBox1.SelectedIndex End Sub

    Visual Basic question lounge

  • How can show the the message to StatusItem1 when I click the btnSave?
    M Muhammad Javed Khan

    StatusBar1.Panels(1).Text = "Hello"

    Visual Basic tutorial question

  • Compare value from database
    M Muhammad Javed Khan

    may be "user" field have null values thats y it will be giving error Try this: cmd.commandtext="select user from reg" da.selectcommand=cmd da.fill(ds,"reg") for each dr in ds.tables("reg").rows If textbox1.text= (dr.item(0) & "") then msgbox("UserExists") endif next

    Visual Basic database help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups