Multiple table problem


I was hoping someone could take the following data and
show me the steps to make it work. I can do it with a
single table but not with multiple tables

The web will have the following fields:

db NAME "DUDE"

Policy Number (Insurance Table)
LastNAme (Custome Table)
RenewalDate (Insurance Table)

1. User can add/delete new customer all fields
2. User can Update RenewalDate


I have many more fields but I would appreciate which
web controls to use and the codebehind to make this
work.
*************
*************
Here is my other post that has not received any response

I am really stumped at this point. The forum has given
me lots of ideas but nothing to show me how to do this.

How do I input a multi-table DataSet to a Web Forms DataGrid

that can be inserted, updated, and deleted?

Visual Studio 2003, SqlServer DataBase

I am trying to create a datagrid that will have
fields from 4 separate tables.

When I drag in a SqlDataAdapter and
add all four tables to my query I get the following
Messages:

Generate insert statement

The original query has a select list that has
columns from multiple tables. The statement
cannot be generated automatically
for this type of query.

Generate Update statement

The original query has a select list that has
columns from multiple tables. The statement
cannot be generated automatically
for this type of query.

Generate Delete statement

The original query has a select list that has
columns from multiple tables. The statement
cannot be generated automatically
for this type of query.

Comments

  • [b][red]This message was edited by DrMarten at 2006-1-14 2:9:47[/red][/b][hr]
    [b][red]This message was edited by DrMarten at 2006-1-14 1:56:2[/red][/b][hr]
    :
    : I was hoping someone could take the following data and
    : show me the steps to make it work. I can do it with a
    : single table but not with multiple tables
    :
    : The web will have the following fields:
    :
    : db NAME "DUDE"
    :
    : Policy Number (Insurance Table)
    : LastNAme (Custome Table)
    : RenewalDate (Insurance Table)
    :
    : 1. User can add/delete new customer all fields
    : 2. User can Update RenewalDate
    :
    :
    : I have many more fields but I would appreciate which
    : web controls to use and the codebehind to make this
    : work.
    : *************
    : *************
    : Here is my other post that has not received any response
    :
    : I am really stumped at this point. The forum has given
    : me lots of ideas but nothing to show me how to do this.
    :
    : How do I input a multi-table DataSet to a Web Forms DataGrid
    :
    : that can be inserted, updated, and deleted?
    :
    : Visual Studio 2003, SqlServer DataBase
    :
    : I am trying to create a datagrid that will have
    : fields from 4 separate tables.
    :
    : When I drag in a SqlDataAdapter and
    : add all four tables to my query I get the following
    : Messages:
    :
    : Generate insert statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.
    :
    : Generate Update statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.
    :
    : Generate Delete statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.
    :
    -----------------------------------------------------------------------

    To do this with multiple tables you may need to declare variables that are GLOBAL to your program.

    To do this put each of the DIM statements just below the line as in the following example.>>

    #Region " Windows Form Designer generated code "
    Dim myString As String

    Doing this will make each GLOBAL variable available to each and every Private_Sub or Public_Sub such as

    Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click

    'This Private Sub can use the variable> myString

    End Sub

    Hope this helps you?

    Regards,

    Dr M.





  • : [b][red]This message was edited by DrMarten at 2006-1-14 1:56:2[/red][/b][hr]
    : :
    : : I was hoping someone could take the following data and
    : : show me the steps to make it work. I can do it with a
    : : single table but not with multiple tables
    : :
    : : The web will have the following fields:
    : :
    : : db NAME "DUDE"
    : :
    : : Policy Number (Insurance Table)
    : : LastNAme (Custome Table)
    : : RenewalDate (Insurance Table)
    : :
    : : 1. User can add/delete new customer all fields
    : : 2. User can Update RenewalDate
    : :
    : :
    : : I have many more fields but I would appreciate which
    : : web controls to use and the codebehind to make this
    : : work.
    : : *************
    : : *************
    : : Here is my other post that has not received any response
    : :
    : : I am really stumped at this point. The forum has given
    : : me lots of ideas but nothing to show me how to do this.
    : :
    : : How do I input a multi-table DataSet to a Web Forms DataGrid
    : :
    : : that can be inserted, updated, and deleted?
    : :
    : : Visual Studio 2003, SqlServer DataBase
    : :
    : : I am trying to create a datagrid that will have
    : : fields from 4 separate tables.
    : :
    : : When I drag in a SqlDataAdapter and
    : : add all four tables to my query I get the following
    : : Messages:
    : :
    : : Generate insert statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    : :
    : : Generate Update statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    : :
    : : Generate Delete statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    : :
    : -----------------------------------------------------------------------
    :
    : To do this with multiple tables you may need to declare variables that are GLOBAL to your program.
    :
    : To do this put each of the DIM statements just below the line as in the foolowing example.>>
    :
    : #Region " Windows Form Designer generated code "
    : Dim myString As String
    :
    : Doing this will make each GLOBAL variable available to each and every Private_Sub or Public_Sub such as
    :
    : Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
    :
    : 'This Private Sub can use the variable> myString
    :
    : End Sub
    :
    : Hope this helps you?
    :
    : Regards,
    :
    : Dr M.
    :
    :
    :
    :

  • : : [b][red]This message was edited by DrMarten at 2006-1-14 1:56:2[/red][/b][hr]
    : : :
    : : : I was hoping someone could take the following data and
    : : : show me the steps to make it work. I can do it with a
    : : : single table but not with multiple tables
    : : :
    : : : The web will have the following fields:
    : : :
    : : : db NAME "DUDE"
    : : :
    : : : Policy Number (Insurance Table)
    : : : LastNAme (Custome Table)
    : : : RenewalDate (Insurance Table)
    : : :
    : : : 1. User can add/delete new customer all fields
    : : : 2. User can Update RenewalDate
    : : :
    : : :
    : : : I have many more fields but I would appreciate which
    : : : web controls to use and the codebehind to make this
    : : : work.
    : : : *************
    : : : *************
    : : : Here is my other post that has not received any response
    : : :
    : : : I am really stumped at this point. The forum has given
    : : : me lots of ideas but nothing to show me how to do this.
    : : :
    : : : How do I input a multi-table DataSet to a Web Forms DataGrid
    : : :
    : : : that can be inserted, updated, and deleted?
    : : :
    : : : Visual Studio 2003, SqlServer DataBase
    : : :
    : : : I am trying to create a datagrid that will have
    : : : fields from 4 separate tables.
    : : :
    : : : When I drag in a SqlDataAdapter and
    : : : add all four tables to my query I get the following
    : : : Messages:
    : : :
    : : : Generate insert statement
    : : :
    : : : The original query has a select list that has
    : : : columns from multiple tables. The statement
    : : : cannot be generated automatically
    : : : for this type of query.
    : : :
    : : : Generate Update statement
    : : :
    : : : The original query has a select list that has
    : : : columns from multiple tables. The statement
    : : : cannot be generated automatically
    : : : for this type of query.
    : : :
    : : : Generate Delete statement
    : : :
    : : : The original query has a select list that has
    : : : columns from multiple tables. The statement
    : : : cannot be generated automatically
    : : : for this type of query.
    : : :
    : : -----------------------------------------------------------------------
    : :
    : : To do this with multiple tables you may need to declare variables that are GLOBAL to your program.
    : :
    : : To do this put each of the DIM statements just below the line as in the foolowing example.>>
    : :
    : : #Region " Windows Form Designer generated code "
    : : Dim myString As String
    : :
    : : Doing this will make each GLOBAL variable available to each and every Private_Sub or Public_Sub such as
    : :
    : : Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
    : :
    : : 'This Private Sub can use the variable> myString
    : :
    : : End Sub
    : :
    : : Hope this helps you?
    : :
    : : Regards,
    : :
    : : Dr M.
    : :
    : :
    : : How do I get around the SqlDataAdapter errors?
    When I drag in a SqlDataAdapter and
    : add all four tables to my query I get the following
    : Messages:
    :
    : Generate insert statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.
    :
    : Generate Update statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.
    :
    : Generate Delete statement
    :
    : The original query has a select list that has
    : columns from multiple tables. The statement
    : cannot be generated automatically
    : for this type of query.

    : :
    :
    :

  • : : : [b][red]This message was edited by DrMarten at 2006-1-14 1:56:2[/red][/b][hr]
    : : : :
    : : : : I was hoping someone could take the following data and
    : : : : show me the steps to make it work. I can do it with a
    : : : : single table but not with multiple tables
    : : : :
    : : : : The web will have the following fields:
    : : : :
    : : : : db NAME "DUDE"
    : : : :
    : : : : Policy Number (Insurance Table)
    : : : : LastNAme (Custome Table)
    : : : : RenewalDate (Insurance Table)
    : : : :
    : : : : 1. User can add/delete new customer all fields
    : : : : 2. User can Update RenewalDate
    : : : :
    : : : :
    : : : : I have many more fields but I would appreciate which
    : : : : web controls to use and the codebehind to make this
    : : : : work.
    : : : : *************
    : : : : *************
    : : : : Here is my other post that has not received any response
    : : : :
    : : : : I am really stumped at this point. The forum has given
    : : : : me lots of ideas but nothing to show me how to do this.
    : : : :
    : : : : How do I input a multi-table DataSet to a Web Forms DataGrid
    : : : :
    : : : : that can be inserted, updated, and deleted?
    : : : :
    : : : : Visual Studio 2003, SqlServer DataBase
    : : : :
    : : : : I am trying to create a datagrid that will have
    : : : : fields from 4 separate tables.
    : : : :
    : : : : When I drag in a SqlDataAdapter and
    : : : : add all four tables to my query I get the following
    : : : : Messages:
    : : : :
    : : : : Generate insert statement
    : : : :
    : : : : The original query has a select list that has
    : : : : columns from multiple tables. The statement
    : : : : cannot be generated automatically
    : : : : for this type of query.
    : : : :
    : : : : Generate Update statement
    : : : :
    : : : : The original query has a select list that has
    : : : : columns from multiple tables. The statement
    : : : : cannot be generated automatically
    : : : : for this type of query.
    : : : :
    : : : : Generate Delete statement
    : : : :
    : : : : The original query has a select list that has
    : : : : columns from multiple tables. The statement
    : : : : cannot be generated automatically
    : : : : for this type of query.
    : : : :
    : : : -----------------------------------------------------------------------
    : : :
    : : : To do this with multiple tables you may need to declare variables that are GLOBAL to your program.
    : : :
    : : : To do this put each of the DIM statements just below the line as in the foolowing example.>>
    : : :
    : : : #Region " Windows Form Designer generated code "
    : : : Dim myString As String
    : : :
    : : : Doing this will make each GLOBAL variable available to each and every Private_Sub or Public_Sub such as
    : : :
    : : : Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
    : : :
    : : : 'This Private Sub can use the variable> myString
    : : :
    : : : End Sub
    : : :
    : : : Hope this helps you?
    : : :
    : : : Regards,
    : : :
    : : : Dr M.
    : : :
    : : :
    : : : How do I get around the SqlDataAdapter errors?
    : When I drag in a SqlDataAdapter and
    : : add all four tables to my query I get the following
    : : Messages:
    : :
    : : Generate insert statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    : :
    : : Generate Update statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    : :
    : : Generate Delete statement
    : :
    : : The original query has a select list that has
    : : columns from multiple tables. The statement
    : : cannot be generated automatically
    : : for this type of query.
    :
    : : :
    : :
    : :
    :
    :

    -------------------------------------------

    Why not try using a multi-dimensional array then or do what you are doing in 1 big table. Just update the fields you are wanting to change and leave the rest unchanged? Just a thought....?

    Regards,

    Dr M.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories