Using SQL with VB.Net
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
So basically I have a textbox with a number in it in a vb project, and I want to be able to store that in a database together with a user number, so like the first user of the app who generates the number will have an entry in the database which will contain the number 1 because they are the first user and the number that was generated, then the second person will have 2 and the number and so on...
I have no clue how to do this, I don't use SQL and need help, any help, preferably help with everything, from how to set up SQL to how to do the databases, just help please.
I have no clue how to do this, I don't use SQL and need help, any help, preferably help with everything, from how to set up SQL to how to do the databases, just help please.
Hmm I don't know database hat much but I think #smashapps made a tutorial on our site [url]http://creativeprogramming.info/2013/04 ... -tutorial/[\url]
hmm not sure if i get you correct but
you want to generate ID in the sql or you want to generate your own ID and the store it in the sql?
if you want to generate ID you need to use the Primare Key
if you want to generate them yourself you just do
you want to generate ID in the sql or you want to generate your own ID and the store it in the sql?
if you want to generate ID you need to use the Primare Key
if you want to generate them yourself you just do
Code: Select all
then just do in the button section
dim myID as integer = 0
Code: Select all
myID = +1 'not tested i write it just now :)
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Disregard #Dummy1912 idea of incrementing the ID. When you're working with databases in Vb.Net:
(As taken from my own tutorial)
"change AutoIncrementSeed and AutoIncrementStep to 1 from -1. Changing this will mean when you add new records it will increment from 1"
follow the tutorial here: Click here
We don't use an integer and increase it by one each time we use the properties that vb.net gives us in the design view of the table because then we don't have to worry about it, it automatically increases each time.
If you need more help you can contact me I will be happy to help more.
(As taken from my own tutorial)
"change AutoIncrementSeed and AutoIncrementStep to 1 from -1. Changing this will mean when you add new records it will increment from 1"
follow the tutorial here: Click here
We don't use an integer and increase it by one each time we use the properties that vb.net gives us in the design view of the table because then we don't have to worry about it, it automatically increases each time.
If you need more help you can contact me I will be happy to help more.
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
You should have a primary key, in the first place you should know how to set up the primary key( ( its very important, else your database will fail) . alot of tutorials in you-tube to help you with this database.
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023