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
R

Rashar

@Rashar
About
Posts
55
Topics
37
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using writeline to write string with leading 0's to excel worksheet columns?
    R Rashar

    Hi, Consider the following line, oWrite.WriteLine(strItem & vbTab & partNo) The variable partNo is a string that pulls in a number as such, 00001567842. I am using the writeline method to send that string to an excel sheet. I need to have the values in strItem in column 1, and the values of partNo in column 2 including the leading zeros. I have tried the {1,11}, partNo format or Format("###########", partNo). I have tried declairing partNo as a String as well as an Integer, but neither data types work. I tried to create a csv file, and it does include the leading 0's but when I use vtab, I get the values of strItem, plus a square (which I assume is the vtab), then my partNo all in one cell. Is it possible to accomplish what I want with just the WriteLine method? Thanks in advance.

    Visual Basic question

  • How to open new form from a datagridview row?
    R Rashar

    That's great... Could you please post some sample code? I have declared my variable, but it is not passing the id to the other form when I double click on the datagridview row... Thanks for your assistance! -- modified at 12:50 Thursday 10th May, 2007

    Visual Basic question csharp css visual-studio tutorial

  • How to open new form from a datagridview row?
    R Rashar

    Yes. That is exactly correct.

    Visual Basic question csharp css visual-studio tutorial

  • How to open new form from a datagridview row?
    R Rashar

    Hello, Working in visual studio 2005, I have managed to create, setup, and populate a datagridview as follows: Dim ds As DataSet = New DataSet 'FILL DATASET da.Fill(ds, "qryTableReports") ds.Locale = System.Globalization.CultureInfo.CurrentUICulture 'DISPLAY DATASET TO DATAGRIDVIEW1 DataGridView1.DataSource = ds DataGridView1.DataMember = "qryTableReports 'SET COLUMN WIDTH DataGridView1.Columns(0).Width = 25 DataGridView1.Columns(1).Width = 125 DataGridView1.Columns(2).Width = 50 DataGridView1.Columns(3).Width = 50 DataGridView1.Columns(4).Width = 50 DataGridView1.Columns(5).Width = 45 '*** END DATAGRIDVIEW1 SETUP What I want to do now is to be able to select any row from my data grid, and once selected, it will open up a new form with the dataset from the row selected. How can I accomplish this? Is the DataGridView control the best control to use in this case? Thanks in advance.

    Visual Basic question csharp css visual-studio tutorial

  • How to take values of a dataset, and populate a local table?
    R Rashar

    Hello, Using VB.NET, I have populated a dataset that reads records from table tblCustomer that resides on the network (SQL Server 7.0). How do I take the records from that dataset(SQLDataset), and store it in a local table called tblCustomer(SQL Express Edition)? Keeping in mind, my tables, tblCustomer, has about 52 columns, so if I can some how just import the data in one shot as opposed to using the .NewRow methods... myNetworkSqlDataAdapter.Fill(SQLDataset) Thanks in advance.

    Visual Basic sysadmin question csharp database

  • Cannot show multiple values for combobox DisplayMember?
    R Rashar

    Hello, I'm trying to populate my ID and Dealername in my combobox, but when I try the below scripts, I'm only seeing the ID at runtime... How can I show both the ID and DealerName in my combobox? Me.cboSelectDealer.DataSource = ReportDS.Tables("tblCall_Reports") Me.cboSelectDealer.DisplayMember = "UID" & "-" & " DealerName" Me.cboSelectDealer.ValueMember = "UID" Me.cboSelectDealer.DataSource = ReportDS.Tables("tblCall_Reports") Me.cboSelectDealer.DisplayMember = "UID" + "-" + " DealerName" Me.cboSelectDealer.ValueMember = "UID" Thanks in advance.

    Visual Basic question

  • Where is my data?
    R Rashar

    Hello, I've created a call reporting app using SQL Express edition as the local data source, and have packaged it up, and deployed it on another machine. Once I installed it on the other machine, the program runs fine, and I can see that my data has populated in some forms. How do I gain access to those tables? After my app installed, I only see an executeable to launch the program, and cannot locate the tables with data in it anywhere. Thanks in advance, Rashar

    Visual Basic question database

  • Updating table using SelectCommand.CommandText?
    R Rashar

    Hello, I have tried the code below to update my table, but I'm not sure if it is in the right context... The problem that I am facing is that my data is being passed to the table, but it creates a new row as oppose to updating the row that I specified... and I think that is coming from the line that reads myLocalDataSet.Tables("tblCall_Reports").Rows.Add() How can I modify this code so that it will update my table based on the SQL criteria? 'Save changes to the database myLocalSqlDataAdapter.SelectCommand.CommandText = "SELECT * FROM tblCall_Reports WHERE UID = " & txtUID.Text myLocalDataSet.Tables("tblCall_Reports").Rows.Add() myLocalSqlDataAdapter.Update(myLocalDataSet, "tblCall_Reports") Thanks in advance, Rashar

    Visual Basic database question help announcement

  • Problem clearing process ...
    R Rashar

    Hello, I have a filestream that I am able to read only once when my program launches. If I attempt to read the line a second time, I receive the message "The process cannot access the file 'C:\IMGfromDB.BMP' because it is being used by another process." at this line of code... fs = New FileStream(savedIMGName, FileMode.OpenOrCreate, FileAccess.Write) I've tried the following to release the processes... fs.Close() fs.Dispose() and File.Delete(savedIMGName) Thanks in advance -- modified at 14:11 Tuesday 11th July, 2006

    Visual Basic help announcement

  • Which local datasource to use? [modified]
    R Rashar

    Hello, Looking for some advice on choosing a local data source for a call reporting project that will have approximately 25 end users using it. I have currently developed the app in vb.net. As of now, I am just using SQL Express edition and if I am deploying the project, I would like to be able to quickly access the data on the end users PC. Also, i'm finding that if I make a change in any of my table definitions (such as adding or removing a column), it seems to clear the data in my tables. On the other hand, if I use MS Access, I get quick access to the tables if need be and I can make changes to the table without worrying about loosing data. Any suggestions from a maintenance / performance perspective on the 2 sources? Thanks, Rashar -- modified at 19:45 Monday 10th July, 2006

    Database csharp database performance question

  • Cannot not get bound textbox control to sync with Combobox
    R Rashar

    Almost... My form has more than one textbox control, for example, txtCustomerName, txtAddress, txtCity, txtEmail. At design time I can set the binding source to each control's text property as such: txtCustomerName I would set to - TblCustomerBindingSource - Cust_Name txtAddress I would set to - TblCustomerBindingSource - Address txtCity I would set to - TblCustomerBindingSource - City So all my controls would look at their respective dataset, so when I scroll through my combobox, if I picked customer A then I would see the address, city, email etc. for customer a in my textboxes...subsequently if I chose customer B, I would see info for customer B etc. I need to set this up manually, or unless there is a way that I can have multiple bindings to a textbox control because I also need to have those controls look at another table's / bindingsource. Thanks.

    Visual Basic question wpf wcf sales

  • Cannot not get bound textbox control to sync with Combobox
    R Rashar

    Hello, When my combobox loads with the dataset, my textbox control shows only the first record. How can I set the code below so that as I pick a customer name from the combobox, it also shows the same customer name in my textbox? Me.cboSelectDealer.Enabled = True Me.TblCustomerTableAdapter.Fill(Me.CustomerDataset.tblCustomer) Me.cboSelectDealer.DataSource = CustomerDataset.Tables("tblCustomer") Me.cboSelectDealer.DisplayMember = "Cust_Name" Me.cboSelectDealer.ValueMember = "ID" Me.txtCustomerName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.CustomerDataset, "tblCustomer.Cust_Name")) Thanks in advance, Rashar

    Visual Basic question wpf wcf sales

  • SQL Script to delete empty rows in a table
    R Rashar

    Actually, I was just using it as an example for a column name. I do have it set to a primary key, it's just that my end user may save a blank form which would populate the prodID column, but the rest of the columns may all be blank. If so, I wanted to clean up the table if there are columns that are blank. I could make it so that all the columns are not null, but with my program it can't work that way, as I need to request an ID first and foremost. Thanks.

    Visual Basic csharp database tools question

  • SQL Script to delete empty rows in a table
    R Rashar

    Colin Angus Mackay wrote:

    What do you mean by "blank data"? From the two examples you gave you appear to be trying to check whether prodID is an empty string (or is that a string with one space), or possibly if it is NULL.

    Yes. I'm looking to delete the record where prodID is a null field. I will try the first option. Thanks

    Visual Basic csharp database tools question

  • SQL Script to delete empty rows in a table
    R Rashar

    Hello, How do you delete a row in vb.net where there is blank data? I've tried the following, and all do not work... strSQL = DELETE FROM tblProducts WHERE prodID = & " " strSQL = DELETE FROM tblProducts WHERE prodID = & Nothing Thanks in advance.

    Visual Basic csharp database tools question

  • Textbox control bound to binding source?
    R Rashar

    I figured it out... I changed the order of my dataset to order by ID Desc. Now it looks at the current record.

    Visual Basic question wpf wcf

  • Textbox control bound to binding source?
    R Rashar

    I have a sub called Save that saves a record to a table. I have an ID column that is autonumbered in the table. I also have a textbox that is bound to the ID column. Every time I click the save button, it creates a new record which is fine, but the ID in my textbox always remains the same. How can I "autonumber" my textbox, so that the textbox looks at the most recent ID, or saved record? Thanks in advance, Rashar

    Visual Basic question wpf wcf

  • Clearing selected items from comboboxes
    R Rashar

    Ahhh... That worked nice. Thanks soodmonu!

    Visual Basic question csharp database

  • Clearing selected items from comboboxes
    R Rashar

    I have a combobox with 12 numbers listed in it. A user can either select a number, or type it in. I have a command button that will push the selected item into a local database. When I go back to the form, I still see the selected value. How can I have that selected item cleared once the data is saved to the database? I know i can use this: cboSelectedItem.text = "" However, if I have 50 comboboxes, that would be kind of tedius. All my textbox controls seems to clear the data fine, because I have it bound to a dataset so when I clear the dataset, the data in the textbox items clear as well. So I tried to have a collection of items on my combobox plus have it bound to a bindingsource, but Vb.net didn't like that either. Any advice is greatly appreciated. Rashar

    Visual Basic question csharp database

  • How do I use Select Case on checkboxes in a Groupbox control?
    R Rashar

    In Vb, I would have an option or groupbox, with checkbox controls on it. I could set a value for each checkbox and then write the following code... Select Case optGroupbox1 Case 1: 'checkbox 1 'statements Case 2: 'checkbox 2 'statements End Select How would I implement the above code in vb.net? I've tried the following but vb.net does not like Case chkbox1.CheckState = CheckState.Checked call... Select Case GroupBox1.Controls Case chkbox1.CheckState = CheckState.Checked 'statements End Select Thanks in advance.

    Visual Basic question csharp
  • Login

  • Don't have an account? Register

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