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
G

Gymnast

@Gymnast
About
Posts
12
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Winforms Deployment
    G Gymnast

    Newbie!! I am developing a database-oriented windows application in a certain stand alone machine and would like to deploy it in another machine that is also a stand alone computer. Do I have to copy the entire database in the second machine (I would think "YES" because of the database dependancy) or is this brought forward from the dlls that I would be copying by way of OneClickDeployment? Also, is this any different in ASP apps? Thanks

    Windows Forms csharp database winforms sysadmin question

  • Sequential updates
    G Gymnast

    Thanks Mycroft! But I am yet to understand portions of the code you suggested:

    SELECT ColName_0
    FROM stg.IRsCap

    I have a resultSet from a join that I would liek to use.. I assume I can still use that.

    WHERE ID > @HeadRow

    I assume that @HEADERROW is the value of the first IDin the table I am updating (which is 33 in my case).

    IF @Value != ''
    SET @LastValue = @Value

    Here I assume that @Value is declared to hold the Value of the LastName Your input is appreciated. Thanks, Rosh

    Database database help question announcement

  • Sequential updates
    G Gymnast

    I am trying to update records in a table in sequence by setting up a Cursor and using Fetch like so.. DECLARE VPres_Cursor CURSOR FOR select dbo.Person.PersonID, dbo.Person.LastName from dbo.Person inner join dbo.VicePresident ON dbo.Person.PersonID = dbo.VicePresident.PersonID OPEN VPres_Cursor; FETCH NEXT FROM VPres_Cursor WHILE @@FETCH_STATUS = 0 BEGIN FETCH NEXT FROM VPres_Cursor; update dbo.VicePresident set dbo.VicePresident.LastName = LastName END; CLOSE VPres_Cursor; DEALLOCATE VPres_Cursor; While I am able to see the records in the Results window in SQL Management Studio, I am not able to see the actual update in the table. 47 Burr 48 Clinton ... .. 81 Humphrey Can anyone help?? Thanks in advance.. Gymnast.

    Database database help question announcement

  • ComoboBox selection not changing
    G Gymnast

    I have a simple app that has several ComboBoxes. I should be able to change the ComboBox1 selection even after I have changed ComboBox3 (or ComboBox4, should the user change his/her mind). But my ComboBox1, even after changing, when tabbed out of, reverts to the earlier selection. As a start, cboEvents.SelectedIndex = 3. I then move to cboTime and select a certain value there (in cboTime). I then return to cboEvents and change the SelectedIndex to 9. But when I tab out of cboEvents, it reverts to SelectedIndex = 3 (the original selection). Can someone show me how to discard the old selection and save the new selection? PS. I have to mention that cboTime is dependant on cboEvent selection (the code that populates cboTime is based on the SelectedIndex of cboEvents). Thanks!

    ASP.NET tutorial question

  • Parameterized Stored procedure
    G Gymnast

    EventSelect.SelectedValue.ToString SqlCommand.CommandText = "[DeleteEvent]" Can you explain what EventSelect and [DeleteEvent] mean? Which event are you referring to? Gymnast.

    Visual Basic database wpf wcf security collaboration

  • Parameterized Stored procedure
    G Gymnast

    Here is where I get an error message... 'Fill the combobox With Me With .teamComboBox .DataSource = tBindingSource .DisplayMember = "TeamName" .ValueMember = "TeamID" .DataBindings.Add("text", tBindingSource, "TeamName", True, DataSourceUpdateMode.OnValidation) End With End With Not able to convert String ("TeamID") to Int32. It is reading the ValueMember,TeamID as a string, "TeamID". I am not sure if it is OK to use a parent table to populate the combobox, which is what I have done in this case. Team table is the parent of Participant table.

    Visual Basic database wpf wcf security collaboration

  • Parameterized Stored procedure
    G Gymnast

    I am trying to insert data into the table and teamID is the foreign key in the Participant table. I get an error essentially indicating that String (TeamName) cannot be converted to Integer (TeamID). Here is the code... 'Form_Load event Try 'Create an instance of the data-tier component (GymnasticsMeetData) Dim teamData As New Data.GymnasticsMeetData 'Retrieve the dataset from the data-tier Dim TeamDataSet As GymnasticsDataSet TeamDataSet = teamData.getTeamDataSet 'Set up the binding source Dim tBindingSource As New BindingSource With tBindingSource .DataSource = TeamDataSet .DataMember = "Team" .Sort = "TeamID" End With 'Fill the combobox With Me With .teamComboBox .DataSource = tBindingSource .DisplayMember = "TeamName" .ValueMember = "TeamID" .DataBindings.Add("text", tBindingSource, "TeamName", True, DataSourceUpdateMode.OnValidation) End With End With 'UpdateButton_Click event Dim gymClub As String Try gymClub = teamComboBox.ValueMember '(Tried teamComboBox.Text.. did not work) Model.EnrollClass.GymnastAffiliation = gymClub clubLabel.Visible = True clubLabel.Text = gymClub Catch ex As Exception MessageBox.Show("String to Int: " & ex.Message) End Try 'ADO for data access Dim sqlConnection As SqlConnection = New SqlConnection("Data Source=lp1\sqlexpress;Initial Catalog=Gymnastics;Integrated Security=True") Dim sqlCommand As SqlCommand sqlCommand = New SqlCommand("addGymnast", sqlConnection) sqlCommand.CommandType = CommandType.StoredProcedure sqlConnection.Open() Try Dim sqlParameter3 As SqlParameter = New SqlParameter("@TeamID", SqlDbType.Int) sqlCommand.Parameters.Add(sqlParameter3) sqlParameter3.Value = gymClub '(Tried teamComboBox.ValueMember... did not work) Catch ex As Exception MessageBox.Show("String to Int: " & ex.Message) End Try Dim sqlParameter9 As SqlParameter = New SqlParameter("@RetVal", SqlDbType.Int) sqlCommand.Parameters.Add(sqlParameter9) sqlParameter9.Direction = ParameterDirection.Output If sqlCommand.P

    Visual Basic database wpf wcf security collaboration

  • MDI app with Database access
    G Gymnast

    I have an MDI app; This app has 2 forms Form1 and Form2 Form1 has a ComboBox, ComboBox1, which is bound programmatically to a database; Form2 has a textbox that should display the combobox selection in Form1. Essentially, what I would like working is: In the Form1 Button1_Click event, Dim f2 as New Form2 f2 = new Form2 f2.TextBox1.Text = Me.ComboBox1.SelectedItem.Text But this does not work. So I used a Shared variable to retrieve the value of the combobox selection and use that as the value for the textbox in Form2. Public Class Class2 Private Shared meetName As String Public Sub New(ByVal mName As String) meetName = mName End Sub 'Assign Combobox selection to the variable, used in the constructor 'Provide access to NameOfMeet Property Public Shared Property NameOfMeet() As String Get Return meetName End Get Set(ByVal value As String) meetName = value End Set End Property End Class In Form1 Button_Click event: Dim obj As Class2 Try 'Instantiate Form2 Dim f2 As New Form2 f2 = New Form2 obj = New Class2(Me.ComboBox1.SelectedText) ‘While I have instantiated the Class2 (obj), I have not used it anyplace. Is this right? f2.TextBox1.Text = Class2.NameOfMeet f2.Show() Catch ex As Exception MsgBox("Error: " & ex.Message) End Try End Sub With this code, I get the following display in the Textbox in Form2 (where I would like the ComboBox selection from Form1 to display) .. “System.Data.DataRowView”. Your help is appreciated. Thanks, Gymnast

    Windows Forms help database question

  • Multi-Column List
    G Gymnast

    Thank you for getting back.. I am currently using a table that only contains the reserved slots for each seat in a location and not the status of availability for each available slot (every 2 hours). For example, if a seat is reserved for 9:00AM and 1:00PM in a given location on a given date, that is all the information the reference table currently contains. It does not contain any information about what the seat status is at, say, 11:00AM or 3:00PM, 5:00PM, etc. What I am looking for is a way to populate a table or a list with this kind of extended information. can you think of an easy way? Thanks, ASU Gymnast

    ASP.NET help tutorial

  • Multi-Column List
    G Gymnast

    I would like to populate a listview with fields from a table, but with data that does not exist yet... Here is an example... 1. DropDown list allows for selecting a Location 2. Selected Location displays the seats available in the location. 3. Each seat in the location is a column in the new table. 4. Each record in the table shows the reservation/availability status for each of the seats in the location. (The reservation is for a time slot of 2 hours). Seat 1 Seat 2 9:00AM -- Filled Filled 11:00 AM -- Filled Available 1:00PM -- Available Available 3;00PM -- Filled Filled and so on.. What I don't have is a table with 9:00AM, 11:00AM.. slots. Any help with this is appreciated Thanks ASU Gymnast

    ASP.NET help tutorial

  • DateTime Conversion error
    G Gymnast

    I finally got the textbox to work but when I use the same value to populate a dropdown list, it does not work. Actually, it works the first time around and after that there is apparently a postback issue. Because the page does not refresh itself and I am not able to figure out how to get that to happen. Also, there is no error message as such. In a different context, an error message in the form of a warning appears indicating an "Object instance not used" in line 290. What I don't understand to begin with, is the place to find 290 lines of code!! I couldn't find it even among the designer-gen code.

    ASP.NET database sql-server sysadmin help

  • DateTime Conversion error
    G Gymnast

    I am trying to retrieve the time from TableB into TableA. All it does is post the current date in the format...9/30/2007 0:00:00 What I am looking for is the time value in TableB. Here is my code..

    I have made sure the datatypes in the SQL Server database matches in both the Tables.

    Let me know why this is failing.

    Thanks,

    Gym

    ASP.NET database sql-server sysadmin help
  • Login

  • Don't have an account? Register

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