Learning SQL

Soldato
Joined
12 Sep 2005
Posts
3,703
Location
Norwich, England
Hi all,

Looking into learning the basics of sql.

Have a plan to make a small program with a friend who is learning vb.net, so we could both learn as we made this little project and others.

We may make a simple diary, 30days perhaps, 3 time slots in each day, prog would show db (diary days and enties in the time slots) and allow user to update the database (diary).

We would want the database to be offline and kept locally with the little program, what sql db should I use, and would be easy to setup.


Thanks
 
is express the free one, along with visual studio express, etc? Yeah been going through w3schools, so wanna test out some of the basics with this test project.

so is mssql express fairly self explanitory for the type i thing i require? for what I stated above as needing.
 
Hey peeps,

Im hanks friend who is learning VB.Net. Im just wondering if you guys have any good sites for me to check out regarding VB.Net as i see W3Schools doesnt really cover VB.Net. im kind of intermediate with VB so beginners stuff wont really be helpfull.

not sure if i can post this in here or make another thread so apologies in advance.
 
Right a made the database last night, and played around with it, updating, deleting, adding, pulling back data etc and all went well.

Now how do I sort of give this db to my mate?

-------------------------------------
get out of my thread you loser!
 
Right click the database > Tasks > Backup

Click the add button in the bottom right and choose a location to save the backup to - make sure you add a .bak extention to the file. Hit OK.

To restore the database, reverse the process, but choose Restor instead of backup.
 
Hey peeps,

Im hanks friend who is learning VB.Net. Im just wondering if you guys have any good sites for me to check out regarding VB.Net as i see W3Schools doesnt really cover VB.Net. im kind of intermediate with VB so beginners stuff wont really be helpfull.

not sure if i can post this in here or make another thread so apologies in advance.

http://msdn.microsoft.com/en-us/library/ms229335(v=VS.100).aspx

MSDN .NET class library reference - should give you examples in VB.NET.

Too be honest, I think there's less VB.NET online resources than there are C# in general. If you're learning .NET then I'd recommend getting familiar with C# as well.
 
Right click the database > Tasks > Backup

Click the add button in the bottom right and choose a location to save the backup to - make sure you add a .bak extention to the file. Hit OK.

To restore the database, reverse the process, but choose Restor instead of backup.


And say he didnt have ms sql installed? how could i give him a workable database i.e sql code attached to his vb app cud pull back/insert data from the database. so guess what i'm trying to say is can we just have his prog + my db in a folder?

Cheers
 
hmmm very interesting.

so what you do if you wanted to make a phone app with visual studio phone and have a db, phone cudnt be running a sql server so would the only option be for the phone app to look out to the net for the db?

Just trying to get my head around actual ways to use the db.
 
so what you do if you wanted to make a phone app with visual studio phone and have a db, phone cudnt be running a sql server so would the only option be for the phone app to look out to the net for the db?

I think the type of application you're trying to develop is going to influence what technology you'll end up using.

If you're specifically looking to develop an app for a phone then you're obviously wanting a DB with a small footprint then you might be looking at SQL Server Compact; the full-blown SQL Server just isn't going to work.

Having never developed anything for mobiles I'm not aware of the pitfalls, but I expect you'll need to be aware of what SQL Server Compact is capable of, as well as what functionality the .NET framework can provide on mobile platforms compared to the desktop.

On the other hand, if this is purely a VB.NET/SQL learning excercise then what about building a web site or desktop app that just connects to the DB? Make a simple blog application or something that you easily get your head round rather than try and start on something like a mobile app :)

Mansnake said:
yea ive been reading online about VB.net and C# being quite similar, and that microsoft were trying to converge the two.

On a functional level, all .NET languages get compiled behind the scenes into MSIL (or whatever it's called these days). What the languages offer is a choice of syntax/language style - as well as some different features.

I came from ASP using VbScript to ASP.NET and started out on VB.NET but changed over to C# based on the recommendation of a colleague and never looked back. At the end of the day it doesn't make much difference, but the one advantage I've found with C# is it shares similar syntax with things like PHP, JavaScript and Java, which is useful when you change hats mid-project :)
 
Thanks for the reply.

The phone app thing was just an example, although maybe we would try to make something later on but for now just learning basics.

We got a little diary program that we are making so we'll see how we get on with that, I think once we get one prog all hooked up to a db we'll have a better understanding for future progs.

I'll have a look into SQL Server Compact.

Thanks
 
Right so I was playing around with it and I actually made a sql compact 2008 db, didnt realise but anyway, now trying to sort out a proper ms sql 2008 db, now don't know if it's because when I installed it the options were wrong etc but the only server i can get to load is the compact version.


I load up sql server manager 2008

I get two options database engine or sql compact

now I presume database engine is the normal full on sql 2008? but when I press that, it then wants details which i cant provide.

Any advice on the initial creation/setup of the server would be good.

Cheers
 
I suspect its more an issue providing the correct details to connect. What error does the management studio throw back at you when you try to connect?

When you installed SQL Server, it would have asked you to specify an instance name. By default, this will be: Machinename\SQLEXPRESS2008 (unless you changed it). Try putting that into the server name and connecting.

You could also try putting in the IP address of the machine if you get no luck using the instance name.
 
i think you maybe right, i didnt change the default instance during installation, i did however put in a username password and think i picked sql server authentication.

This is error i get

"TITLE: Connect to Server
------------------------------

Cannot connect to HankMarvin-pc\SQLEXPRESS2008.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?Prod...rver&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------"

Anyway to check details, edit server without reinstalling?


Thanks
 
Go to your start menu and look for SQL Server 2008 in the list.

If you see a "Configuration Tools" sub-menu, open that and run SQL Server Configuration Manager.

This will show you info on what instances of the server are running and you can configure the settings here. Click on the "SQL Server Services" link and it should give you a run-down of whats running in the right hand pane.

For example, mine lists "SQL Server (SQLEXPRESS)", so I would assume you'd have the same. If it's missing then it's either not installed, in which case you probably will need to reinstall, or it could simply be the service just hasn't been started.

Hope this helps.
 
kkbigal = total ace dude - got in the config and found out everything I needed.

hankmarvin-pc\SQLEXPRESS = server and I just put to "windows auth" and it connected so i wasnt far off before lol.

Thanks a lot buddy
 
No problem :)

Also, not sure if, like me, you came to SQL Server having used MS Access for a while, one of the first questions you'll ask is "how do I create an autonumber column?"

Pre-empting the question: linky

;)
 
Back
Top Bottom