Can it be done ?? plz tell me how to do

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Can it be done ?? plz tell me how to do

 
0
  #1
Sep 12th, 2008
Hello out there ? i have one question rather a strange one

i have two tables say admission and attendance with different fields however admn id , name are the fileds common to both of them

when i add my data in admission table (via form) can i at the same time add the data to attendance table ?? ie .. when i click on save button on admission form will the admn , name fileds will also be entered in the attendance database table??

can it be done ? if yes how ?? can we bind a textbox with 2 data bindings?
i am binding thru properties n rest coding....plz tell me how to do./..
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 19
Reputation: Lee_Sonnenburg is an unknown quantity at this point 
Solved Threads: 2
Lee_Sonnenburg Lee_Sonnenburg is offline Offline
Newbie Poster

Re: Can it be done ?? plz tell me how to do

 
0
  #2
Sep 12th, 2008
just run your commandtext.Insert or whatever it is (i am going by memory) and insert into both tables. No?

Lee
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Can it be done ?? plz tell me how to do

 
0
  #3
Sep 13th, 2008
nah...re.....its nt wrkng! ne other solutions ? ne more appropriate solns?
Originally Posted by Lee_Sonnenburg View Post
just run your commandtext.Insert or whatever it is (i am going by memory) and insert into both tables. No?

Lee
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Can it be done ?? plz tell me how to do

 
0
  #4
Sep 13th, 2008
yes, you just do twice inserting.

>>nah...re.....its nt wrkng! ne other solutions ? ne more appropriate solns?
lee was give the answer. Have u tried it?post your code.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Can it be done ?? plz tell me how to do

 
0
  #5
Sep 13th, 2008
[QUOTE=Jx_Man;690250]yes, you just do twice inserting.

But how will i insert directly ? i have no form for attendance...directly update into the table ??? how can i do this ??? i have not designed any form for the same...i want the admission table values (for the specific rows common in attendance table ) to be also inserted in the attendance table.

2) Ne idea how to clear the Selected item in combo box? ie...when i click on next...my all text box gets clear but combo box values for the previous entry remains intact.....help me
Last edited by laghaterohan; Sep 13th, 2008 at 10:02 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Can it be done ?? plz tell me how to do

 
0
  #6
Sep 13th, 2008
1. Tables field. give the admission and attendance table field. ()
2. You want to all clear item on combo box (empty) or you want to clear selected (ex : ---select your choice---) ??
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Can it be done ?? plz tell me how to do

 
0
  #7
Sep 14th, 2008
selected choise should be erased ...

*Very strange error comes sometimes while i try to enter data in database which says.....
String or Binary data would be truncated !
Whats this error ? its a very common error i cant figure it out.whts the problem....its cums only sumtimes not always...why so ???

reply soon !

Originally Posted by Jx_Man View Post
1. Tables field. give the admission and attendance table field. ()
2. You want to all clear item on combo box (empty) or you want to clear selected (ex : ---select your choice---) ??
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Can it be done ?? plz tell me how to do

 
0
  #8
Sep 14th, 2008
>> *Very strange error comes sometimes while i try to enter data in database which says.....
String or Binary data would be truncated !

this error came up if length of your input more longer than your data type length in database.
Ex: In your database
name -> type : String, Length : 5
but when you input data, its more than 5 character. so it would be truncated.
So, if you input Daniweb it would be -> Daniw.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 126
Reputation: laghaterohan is an unknown quantity at this point 
Solved Threads: 1
laghaterohan laghaterohan is offline Offline
Junior Poster

Re: Can it be done ?? plz tell me how to do

 
0
  #9
Sep 15th, 2008
Okie....i will try...but i have given enuf length for each field sufficiently....ne ways thanks a lot.....u havent yet replied for the combo box question...hp u ll help me out soon
Originally Posted by Jx_Man View Post
>> *Very strange error comes sometimes while i try to enter data in database which says.....
String or Binary data would be truncated !

this error came up if length of your input more longer than your data type length in database.
Ex: In your database
name -> type : String, Length : 5
but when you input data, its more than 5 character. so it would be truncated.
So, if you input Daniweb it would be -> Daniw.
]Okie....i will try...but i have given enuf length for each field sufficiently....ne ways thanks a lot.....u havent yet replied for the combo box question...hp u ll help me out soon
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Can it be done ?? plz tell me how to do

 
0
  #10
Sep 15th, 2008
>> selected choise should be erased ...
This following code will removed selected item on combo box after you click on button 1.
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2. ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)
  3. End Sub
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC