Search results for query: *

  • Users: divjoy
  • Content: Threads
  • Order by date
  1. D

    Concurrency Violation

    Hi, I am using vb express 2010 and sql server 2008 express. I have a simple datagridview on a Windows Form. It retrieves from a standard table and updates the changes when I click the update button see code below. It all works beautifully except occasionally I get an error "Concurrency...
  2. D

    Problem renaming a Form

    Hi , I'm using vb.net 2010 express and I have a form in my vb.net project called frmEditStaff.vb I have many other form and they all start with uppercase FrmEdit.... I tried renaming to FrmEditStaff so that I can then do Dim frmEStaff As New FrmEditStaff frmEstaff.show But its not allowing...
  3. D

    Question Problem passing just the Time parameter to a query

    Hi, I am using vb.net 2010 express. I am connecting to a sql server database and trying to pass a time parameter to a query. But because the time variable in vb is '05:00:00' I get a sql date time overflow error. IT seems to be expexting a date and time ! Is there some easy way of adding the...
  4. D

    Question Sort a DataGridView by values displayed in a combobox

    Hi, Im using vb.net 2010 express and sql server express. I have a datagridview and want to sort it by a column that is a combobox. The combobox display member shows a persons name but that data member is their personnel no. When I sort automatically this sorts by the hidden 'personnel no' and...
  5. D

    Solution to 'cant update a multi table dataset error'

    ...to the Update parameters!!!! Obviously I have the parameters wrong but I do'nt know what to put in their place! cmd = New SqlCommand("SELECT * FROM VwStaff WHERE AreaID=@AreaID AND (LeaveDate Between DATEADD(Day,-27,@PPEndDate) AND @PPEndDate) ORDER BY HomeHelp", conn)...
  6. D

    History log of record changes...

    Hi , Im using sql server 2008R2. I am looking for a way to setup a database such that if a user changes any of the data in a table, the previous value is stored in a history file, the name of the user and date and time of change. But I'm conscious this could cause a major overhead for the...
  7. D

    Question accessing a class methods without an instance...

    Hi, I'm confused about a few things about classes. I have created a class called Global Variables (see below) I want the whole application to to access the members of this class as required. Public Class GlobalVariables Private UName As String = Environment.UserName Private MachineName...
  8. D

    data relation already exist

    Hi, I have created a data relation between 2 tables and everything works ok but when I click on a button to reload the form I get datarealtion error dataset relation already exists. is there any way to test if data relation already exist before assigning it...code is as follows; relation =...
  9. D

    dataset not being saved

    ...If Not IsNothing(ds.Tables("HHWorkedHours")) Then ds.Clear() End If cmd = New SqlCommand("SELECT * FROM TblStaff", conn) cmd.Parameters.AddWithValue("@StaffID", StaffID) da1 = New SqlDataAdapter(cmd) da1.Fill(ds...
  10. D

    Question Weekending only dates in a datetimepicker or a combobox

    Hi Guys, Im using vb.net 2010. I am looking for a way to populate a combox or restrict a datetimepicker with/to a list of Week Ending dates only that are all Sundays ! Any advice how to do this via code. I could of course create a table but I don't want to keep maintaining a table. But would...
  11. D

    date combobox in a datagridview problem

    Hi, I'm using vb.net 2010 express. I have a combobox in a datagridview on a from and the combox gets populated with dates when form loads. All this works OK until I go to select a date from the combobox, the date sometimes appears and disappears quickly and the combox then remains blank...
  12. D

    dataset disposing

    Hi, There is a lot of discussion online about the need or lack of need to dispose of datasets? Many claim there is no need to dispose of a dataset as its a managed resource and therefor looks after itself. Whereas a data adaper and sql connectiion and sql commnad all have to be disposed of...
  13. D

    dataset dispose slowing form down

    Hi, Im using vb.net 2010 express and have a form with the folowing Public Class frmViewClients '..Show Area Clients and their ... Dim Ans As String = "" Dim bs, bs1, bs2 As New BindingSource Dim da As New SqlDataAdapter Dim ds As New DataSet Dim conn As New SqlClient.SqlConnection(connStr)...
  14. D

    Question Event for column to change data in cell in datagridview

    Hi, I'm using vb.net 2010 express with sql server 2008r I have a datagridview with multiple columns and rows on a form. I am trying to populate a particular cell depending on what is entered into another cell for each row. In other words... When I enter a date in column1, I want to then...
  15. D

    datagridview event conflict when adding data

    I have a datagridview with a hidden column where when I add a new row I update the hidden column with code... I want to update the hidden column automatically when I add a new row but this wont work as when the form is being drawn the event's kick off causing havoc... e.g Private Sub...
  16. D

    Question in IDE it occasionally crashes

    Hi, This is just a general question, Im using vb.net 2010 , when I'm in design mode and run my app I developing on, it will very occassionally crash for no reason... when I rerun there no problem..., then when I publish the app and distribute to other users the app work fine and doesn't crash...
  17. D

    Question Using a Class to pass variables between forms

    Hi, I'm not user where to post this so feel free to move it if its in the wrong place. I'm using vb.net 201 express and ql server 208r2 I am developing a system where I am using about 10 global variables. From reading online a lot of users prefer to store there global variables in a class with...
  18. D

    datagridview calcaulation

    Hi, I have a datagridveiw with 8 columns (dataypes as Double), for each row I have to add togther the first 7 columns together and multiply the total by the final column. Then add all column totals together. So code wise, I was thinking 2 nested For Next loops... Is there any other way of...
  19. D

    datagridview in tab control

    Hi, I have a vb form with 4 datagridviews within a tab control with 4 tabs, my questions is when should I populate the dgv's ? Should I place the code in the main form load event or when the user clicks on the specific tab? I am using vb.net 2010 and sql server 2008 Regards
  20. D

    Problem connecting to sql server express 2008 r2 instance

    Hi, I recently installed SQL Server Express 2008 R2 on a Windows XP machine while logged onto machine as the Administrator and now have a problem. vb.net 2010 express I can connect to the instance using the SS Managemnet Studio and the instance appears on my list so everything looks rosy...
Back
Top