Visual studio 2010 - vb.net Lesson #5 - Insert data into SQL Server Database

preview_player
Показать описание
In this lesson, we are going to perform the following:
Create a Form with 2 input fields
Create a SQL Server Database with 1 table and 3 columns.
Create a connection string to our newly created SQL Server database.
Insert data into our SQL database.

Help support our work here on YouTube by purchasing a copy of Wayne Barron's first published book.

What we use in our office.

The microphone
Audio-Technica AT2020USB Plus Condenser Microphone
UK Customers

Keyboards with a sleek design, ease of use, and easy to type on.
Kensington Slim Type Wired Keyboard
UK Customers

Read about Wayne Barron's Authoring Work.

Thank You
Wayne Barron
Dark Effects Studios
(Like Us On Facebook)
Follow us on Twitter
Spotlight on Dark Effects
View all our videos on Dark Effects Video Site
Рекомендации по теме
Комментарии
Автор

5 years later helping people eheh good tut! ;) Keep focus!

MsDriipZ
Автор

Wow interesting accent.

Sounds like a mix between Aussie and Texan lol.



Thanks for the vid!

daniellelievre
Автор

Hi. thanks for the tutorial, but how can I use data connection string from a client machine where there is no sql server installed.?

uchenwoko
Автор

strange, i remember programming on basic before in the old visual basic 6 and impors still lived there, but on this instalation of VS2013 imports don't exist, it's using "using" instead, is this alright?

filippe
Автор

Very rarely do this but thanks for the videos - helped me very much. Had a few issues but managed to resolve myself. 
I am skimming the surface before delving into MCSD. 
Can you advise on making a field required - I'm creating many blank rows! 
For the time being I have disabled Nulls in SQL, I want it to state "Failed please fill required field etc...".

awmerrick
Автор

thank you, you amazing s.o.b! saved ma life

Thenlightenedne
Автор

Hello. I'm really new in ASP.Net as well as SQL. I would just like to ask in the strConnection, how do I know what to put in the provider, data source, and database? I hope you can help me in this as I really have no idea and would really like to learn. Thank you.

alexlim
Автор

Hi,
When I debug the code I get a "OleDbException was unhandled by user code" message on "objconnection.open()" (video time 6:45) syntax when I click the button to enter the data. Also all the "objconnection" listed in the to all highlight. What would be causing this? Other then the strconnection information for the server connect everything seems correct. Should there be a connection created in the DB explorer? Thanks

srvrtk
Автор

is there another method of establishing connection without using the oleDBConnection?

filippe
Автор

Excellent video. Really enjoyed watching it - very informative, and will enable me to enhance my websites using ADO.Net.

GaryHutsonVBA
Автор

if my data base is created in the App_Data, so what should be the path for the data base?

JackyLohJiaCheng
Автор

Thank you, but I have a question
when i try to insert date from Visual Basic Project to SQL Server 2008 with windows 7 I use '" & dateTipePiker.Text & "' it works when I use Windows 8 it don't work
I tried '" & dateTipePiker.Value & "' and '" & dateTipePiker.Value.Date & "' and still dosen't work
What should I do???

TheJoker
Автор

hello.
everytime i go to enter the code for the button it doesnt bring the source code box up?
i just highlights

.asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /
what am i doing wrong?

Jordenmcfall
Автор

eror on conection string, i enter what? if i use server name (local) autentication = windows authentication

panjebarsoennah
Автор

I copied your code and change the names to my database name and the user name. after i run my program and hit submit. i get an error code that says: Cannot open database " Sales" requested by the login. The login failed. can you help me?

sunnydowlatram
Автор

hi i got same error that When I debug the code I get a "OleDbException was unhandled by user code" message on "objconnection.open()".plz help me to solve it

sumitk
Автор

This is exactly what I want to do! Your video is great, but I am having problems trying to implement the code. I'm getting an 'OleDbException was unhandled by user code' error and says 'SQL Server does not exist or access denied'?

sevimeee
Автор

Thanks for explaining so well, but my webpage will come up but will not acces the database!  Error=>"Server either doesnot exist or access denied!"  I tested the connection to the database ...OK!  My table was keyed properly!!  Its just 2 textboxes, how do I keep going wrong?  Woe is me!!!

Автор

please create again on mvc, , i have been looking on the internet, , but all mvc asp.net tutorial use c#, , please upload mvc asp.net in vb

scrtcd.tch
Автор

Hi good job and thanks, done all the exact code, no error shown in program, but when debug, i got the error 'OleDbException was unhandled by user code'  T.T i have try to solve for a long time but cant get it..

tansandy
visit shbcf.ru