I am Getting Error "System.InvalidOperationException : 'Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information'
How do we create the parameter (i.e Select Cus code, Cus Name....) for SqlDataAdapter in Visual Studio 2013? When clicking new query from the table in Server Explorer, there is no option to add table
This type of program not working in Visual Studio 2015 with dynamic SQL. If Select statement have where then it is not working. If you have solution then please provide.
I followed same instructions, but I can not delete any record, my application throws exception: "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." when I try to "Update" after deleting a row. Is this due some setting in the Database or Table?
hello sir there is a problem when in i type the same code in the visual studio 215 i got an error during updating the gridview data how to handle this the error is Dynamic sql generation for the update command is not supported against a selectcommand that does not return any key column information
In Button1_Click, I do a little adjustment, it works now string conString = "Data Source=WIN-3HH0R1TE1AB;Initial Catalog=ExampleSQLDb;Integrated Security=True;Pooling=False"; SqlConnection con = new SqlConnection(conString); con.Open(); SqlDataAdapter sda = new SqlDataAdapter("select * from Table1", con); SqlCommandBuilder scb = new SqlCommandBuilder(sda); DataTable dt = (DataTable)dataGridView1.DataSource; sda.Update(dt);
sir it's not working on my system. error is:{"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."} i selected table by where condition . string sql = "select item,Qty,Price,Total_price,work_status,Bill_No from item_dtls_tab where Bill_No='" + comboBox1.Text + "'"; da = new SqlDataAdapter(sql, cn);
First Work on the example given in the video. Then try your ownpaying attention to the syntax. These videos are for help in understanding.Take your time to patiently work through.
I got it working. Thanks a lot. but when I reload my table. I get something like this: 1 name1 2 name 2 30 It keeps doing that. and doesn't start with 3
how can i display messagebox when one of rows is null? i want to make exception for that situation, please help. BTW thiw video saved my project, thank you
I hate when people want to learn to do something but are too lazy to type the code themselves. There's barely any code to type. The creator of this video doesn't expect anything. Programmers don't really hold people by the hands and just give you everything. Seriously, you actually learn better when you type code. Any teacher will tell you that.
I was trying to do this for 3 weeks and finally i did it. I am so HAPPY. THANKS.
I am from Sri Lanka. Your videos are very easy to understand. They are very helpful me while doing my assignments. Thank you so much.
MAAAAN you're awesome! From Russia with respect
Dear Vetrivel it works fine..
It is really agood piece of work of you. Many thanks.
this makes the things easier for a programmer to play with SQL
In Really Dear Sir Ur methodology is so best thanks
I am From Afghanistan
I am from rwanda.your video is very helpful
Thanks a lot. Your video saved me. Simple and efficient database update via datagridview.
Worked perfectly with MySQL server. Thanks for your kindness
It is well explained ,eazy to understand video ,I love it alot and it was very helpfull.
your code is very easy to get it! Thanks! I am a big fan of your work!
I find the code tremendous value. Makes me remember the amber screen days and other techniques.
muchas gracias. he aprendido mucho con el material que has subido
thanks dear as a beginner this video helped me a lot.
This getting error
object reference not set
(DT)
from 4:50 I cant do insert query or anything,...help
thank you....
i wants more videos like these....
thanks, it really help us for our thesis project :))
where is the INSERT part mate?
I can't find this table. Could you help me? I use Windows 10 and Visual Studio 2017 and 2019
I am Getting Error "System.InvalidOperationException : 'Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information'
How do we create the parameter (i.e Select Cus code, Cus Name....) for SqlDataAdapter in Visual Studio 2013? When clicking new query from the table in Server Explorer, there is no option to add table
Amy Le duni
cara mengatasi duni
This type of program not working in Visual Studio 2015 with dynamic SQL. If Select statement have where then it is not working. If you have solution then please provide.
Hi!
Please how can I get database from Google sheets?
I want to show it on gridview..
+Vetrivel do U think with your video we can learn how to program?
You can do this query insted of yours (Select * from [table name])
What kind of language is that???
Uros Gorensek Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..
+Uros Gorensek Hey do not see the language that he is speaking. Learn the stuff that he is teaching you free of cost !!
if u want to learn in good language than join the institutes
c#
C# bro
Sir if I want to put a delete button and i want to delete using that button then how can we do that ?
Great video ! Thanks for help !
Харош чел
in gridview it not showing me enable adding,deleting,editing why i so can u tell me
I followed same instructions, but I can not delete any record, my application throws exception: "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." when I try to "Update" after deleting a row. Is this due some setting in the Database or Table?
hi me too get same error Dynamic SQL generation how to rectify this error anyone share and fix this.... i am using SQL server 2008
It's useful ! Thanks.
Tremendous Sir
i have a problem on
scb =new SqlCommandBuilder(sda);
sda.Update(dt);
so what can i do?
on button update record
Thank you! works perfectly.
I realize it's kinda off topic but does anyone know a good place to watch new movies online ?
@Koda Joaquin Try FlixZone. You can find it by googling =)
@Callen Byron Yea, been watching on FlixZone for years myself =)
@Callen Byron Thank you, I signed up and it seems like a nice service :D Appreciate it!
@Koda Joaquin no problem xD
hello sir there is a problem when in i type the same code in the visual studio 215 i got an error during updating the gridview data how to handle this
the error is
Dynamic sql generation for the update command is not supported against a selectcommand that does not return any key column information
Hello Muhammad i have same problem this program doesn't work in Visual Studio 2015. If you found any solution then please let me know.
It means when you did your SELECT statement in your sqlAdapter you didn't include the Primary Key from the table you were querying
thank u show much it helped me a lot............can u help me to add on delete button to delete the record from datagridview
In Button1_Click, I do a little adjustment, it works now
string conString = "Data Source=WIN-3HH0R1TE1AB;Initial Catalog=ExampleSQLDb;Integrated Security=True;Pooling=False";
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from Table1", con);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
DataTable dt = (DataTable)dataGridView1.DataSource;
sda.Update(dt);
Can you helpme, insret buton, in form iclude datagridview and textbox (show infomation for each column in datagridview). Thanks
+minh hai Nguyen welcome laptrinhvb.net
where's the deleting?
I have no option for new query
really useful.
Thanks.
sir it's not working on my system. error is:{"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."}
i selected table by where condition .
string sql = "select item,Qty,Price,Total_price,work_status,Bill_No from item_dtls_tab where Bill_No='" + comboBox1.Text + "'";
da = new SqlDataAdapter(sql, cn);
First Work on the example given in the video. Then try your ownpaying attention to the syntax. These videos are for help in understanding.Take your time to patiently work through.
your table doesn't have any primary key. Add a primary key in your table and your error will resolve.
I got it working. Thanks a lot. but when I reload my table. I get something like this:
1 name1
2 name 2
30
It keeps doing that. and doesn't start with 3
Thank you bro!!
how can i display messagebox when one of rows is null? i want to make exception for that situation, please help. BTW thiw video saved my project, thank you
visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak kea hai
Nice Tutorial can u show me how to delete records....
Very helpful indeed
can this code work using wpf ?
I have no idea wtf you're saying.
you dont have to. He shows everything what he is doing. Don't act an idiot.
Thanks a lot 😃😃
Hi, thankyou for your tutorial!
but where's the delete command?
Thanks for this!
{"Object reference not set to an instance of an object."} getting this problem sir
I'm finding it to connect to my database. may anyone please help me
Sir I tried this process but it doesn't getting updated..reason sir
It would be nice if you provide a link to your source code
Regis Maltais Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..
it is very interesting tutorial .please help me if you have any tutorial or source code about plagiarism testing system
Sir it's not working all code is ok but don't know why data is not updating in database :/
it seems like the database is not updated
how to close the datagridview or how to reset it
Thanks u so much friend.
:)
(y)
Thanks, Good Man!
10/10 good one.
thank you very match
errror on
sda.update(dt);
plz help
dalvir singh i have the same problem. appears to be null exception. how to fix?
you might have used "Select * from [table_name]"
use column names like "Select name,age,phone from [table_name]"
that will do i hope !
Can you provide a link to your source code
Where is delete?
why am i always getting problems with these
Thanks
hi my freínds great work could you please share the code ?
thank you
visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak
links video databas ples
thx!
WHERE DELETE ?? THANKS
not working
10/10 bro
the subs at 0:40 tho...
Dude get your mic sorted out, and speak more loudly and articulate PLEASE!!!
can you give kod? plaseeeeee
why programers never put the f*cking code downloadable or in the description, what they are expecting? +Vetrivel D it's an advise.
+ichide7 Thanks for your Feedback. I Will make one blog and i will give that links..
Please Ask any Doubts i will make video for that..!
+Vetrivel D hi,it just have an update and fetch data,where is Delete command ?
+Vetrivel D Do you have Entity Framework example ? And with 2 or more ways how to bind to grid.
I hate when people want to learn to do something but are too lazy to type the code themselves. There's barely any code to type. The creator of this video doesn't expect anything. Programmers don't really hold people by the hands and just give you everything. Seriously, you actually learn better when you type code. Any teacher will tell you that.
Excelent.
where is insert and delete code ? time waste
wasting of time.
y?
Rubbish
Hi!
Please how can I get database from Google sheets?
I want to show it on gridview..