goo.gl/RFY5C2 : Subscribe to CodAffection goo.gl/Z6SkSC : C# CRUD Operations With DB goo.gl/WsgPbp : C# User Registration With DB goo.gl/Gu5q37 : Export PDF in C#
OMG! You saved me! Thought I was going to be up all night again trying to finish my project, but this video was SOOO helpful! Thank you, thank you, thank you.
System.Data.SqlClient.SqlException (0x80131904): An attempt to attach an auto-named database for file C: \Users\jmpla\source epos\Aqua Lab\DataBase\LoginDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. HELPPP
I cant debug it shows 1)The name 'txtusername' does not exist in the current context 2)The name 'txtpassword' does not exist in the current context Plz help what I do
In stead of saving the file, click the UPDATE button in the top left cornor of the window, then you'll get a window where you can click execute query, your table will be added to your database ;)
Thanks for this tutorial , but I have a problem with the sda.Fill(dtbl). ==> System.Data.SqlClient.SqlException: 'An expression of non-boolean type specified in a context where a condition is expected, near 'de'.' I have already read the comments and i didn't find the right answer . Please answer me as soon as possible.
Thank you for good subject guven for me....i have an doubt I. E., u r creating one table that is login table in database right, in that table first username value is 1 only....y u giving user1 as in username value in login form? 1 and user1 both r same in this situation? Please clarify my doubt as soon as possible. I'm waiting for ur response. Tq
Hi, I have a question. In video, you have one main form. But if I have two, and for each form I have login and password, how I can realize this? 9:10 - I see, you create here 2 users, but you didn't use 2nd user in code. I try did it - I remade part of code "if(dtbl.Rows.Count == 1)", where I changed 1 to 2 and changed text in braces for my 2nd form and this reworked part I inserted after "else {...}". But when I run the application and enter the data for the second user, Visual Studio opens for some reason the first form. What should I do?
Don't know if you figured it out or not but I will leave this here for anyone with the same problem. There is an update button at the top of the table you can click on. It will then save it on the existing mdf file. Under the table there is a sql query on that you can edit your table. Make changes here. To see the change or whether your table is created or not you have to rightclick the table folder on the database connection and refresh.
Those having issue with sda.Fill(dt); please, check your sda query, the username and password we are using from input in the query should have apostrophes " ' " enclosing them. please, check the code carefully and make sure you add those, and your problem will be solved.
System.Data.SqlClient.SqlException: 'An attempt to attach an auto-named database for file C: \Users\sam\Desktop\Passwords And user.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.'
I wrote my code exactly like this, only my table name is /*Signup*/. Upon running the application even after entering correct username and password it is saying check username and password. Please help
bakit kapag pinipindot ko yung login ganto nalabas? An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: An attempt to attach an auto-named database for file C: \Users\Mercado\Documents\Visual Studio 2015\Projects\GenericoCashieringSystem\GenericoCashieringSystem\LoginDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
but the password string anyone can see if they open sql server database. How can convert the password string into some unique symbol in sql server that is not the password we type in the text box?
how can i fix Error 1 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Control.Show()' c:\users eda\documents\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs 33 16 WindowsFormsApplication1
Hi, I'm using VS 2017. Thank you for this video, it is great and so helpful! But I followed exactly as what you have shown but when I entered the right credentials, it will run the else statement still. Do you know how I can fix this? Thank you in advance~!
At 8:40 when i press ctl+s instead of showing a dialoge box that shows in the video like choose name, my PC asks to saves the file in my documents or in local disk drive instead of saving it in visual studio like a dialoge box has appeared for the name of the table. Please can someone help. Please.
I think i have the same problem too. I first save a place where in your drive then in the upper-left corner of the Table Designer, select the Update button. Then you save it I think(because im trying
Why this error occur at 'sda.Fill(dtbl)'? Exception unhandled System.Data.SqlClient.SqlException: 'An attempt to attach an auto-named database for file C: \Users\User\Documents\Visual Studio 2017\Projects\LoginApp\DB\LoginDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.'
How to make it to connect to a website Sql data have I replaced the like url for the database with the remote database but when I hit start it will stop saying like it can't connect but it's connected in visual studio.