database for vb.net and asp.net - asp.net

is it possible to use same database for both vb.net appplication and asp.net??
and if is possible, how can to connect it???
now..i'd build vb.net application and asp.net in my laptop...
it can connect..but i wonder how to make the database connect for vb.net and asp.net in real...
thank you in adnvance

Short answer... Yes.
Databases are meant to be shared by many different applications as well as many different types of applications.
For VB.net and ASP.NET (in the code behind), you can use the same code to access the database...
Using _conn as New SqlConnection(connectionString)
'Do Stuff'
End Using
For databases to use for free, you can get MS SQL Express edition, Oracle XE, MySql, and a few others.

If you write your data access layer (DAL) as a web service (or WCF application) then both your ASP.NET site and Winforms app can call the DAL and have access to the same data in the same database.

Related

Difference between Entity Framework and Microsoft SQL Server

I'm fairly new to mvc, asp.net, and .net framework in general.
I understand what models are, controllers and views, but what I don't get it is Entity Framework. I developed websites before using php, and when I needed to store some data I simply do that using MySql databases. I thought this is the case with asp.net, same concept but instead of MySql, Microsoft Sql server is used. Now I started to learn .net framework and I watched a lot of online tutorials and saw them using some classes inherited from DbContext to store data! Can anyone tell me where these classes store the data and why don't we use Microsoft Sql server instead?
Entity Framework is an Object Relational Mapping tool (ORM), a layer that sits between your database and code. The idea is that the ORM is database agnostic and will handle writing the SQL for you, so that you could (in theory) swap between SQL Server, MySQL, or whatever database you want with only configuration changes.
You can skip Entity Framework and use SQL directly with ASP.Net. Your tutorials just happen to use Entity Framework.

asp.net mvc example with db

I know the basics of MVC. But I am looking for an asp.net mvc example with db.
The following example explains the same - but the db is within the app_data folder. But in real practice, as u know, we will use an external SQL server for this
http://www.asp.net/mvc/tutorials/older-versions/movie-database/create-a-movie-database-application-in-15-minutes-with-asp-net-mvc-cs
Can u pl site an example - which explains asp.net mvc with db (just save & retrieve)
It might not completely meet your question but it is quit usual to use Entity Framework or NHibernate to manage your database
See ASP.Net site or the Entity Framework tutorial
Maybe you can find some other answers at that site.
There is no difference on the mvc side. You just have a different connection string to point to a sql server instead of a file inside app_data folder.
Create the same database on you local sql server express and change the connection string to point there. You'll see that will work the same.
In order to make your life easier, you can download SQL ServerManagement Studio Express (this is 2008 version)

Asp.net Web API With No Entity Framework

We want to start using Asp.net web api for our future enterprise services however we do not want to use EF for data access.
Are there any samples out there for Asp.net Web APi working with regular ado.net classes instead of EF?
Thanks.
Are you looking for code samples for how to use e.g., SqlConnection, SqlCommand, SqlDataReader?
You would use the classes in System.Data.SqlClient if you are trying to talk to SQL Server, System.Data.OracleClient if you're trying to talk to Oracle, or System.Data.Odbc if you're trying to talk to MySQL.
Here are some code samples for how to call a stored procedure from ADO.NET. Good luck!

What parts of asp.net, c# and database should I use to create a forum like stackoverflow?

I am a fresher and I have got a project in asp.net and c#. I have to create a forum, something like stackoverflow, so I have studied asp.net, c# and sql server 2008 but now I am unsure how I should start work on this project.
What technology and what part of asp.net, c# and the database will I use more? I have 3 days to study so I want to know which parts of asp.net, database and c# I have to cover in 3 days.
It's my first live project, will I have to study any other languages or are the ones listed enough?
Session management, good understanding about web controls and user control.
and just go throgh ado.net if u are using asp.net.
Maybe you should try to use ASP.net mvc check this link.
If you are going to use sql server as database / Backend of you application than
start getting infomation about linq to sql >>
LINQ to SQL: .NET Language-Integrated Query for Relational Data
or you can also go for entity framework
The ADO.NET Entity Framework Overview

How to integrate an oracle database with an asp.net web application?

How to integrate an oracle database with an asp.net web application?... Any good tutorial to start with?
This link might help you:
In this article, I'll explain the basic yet essential processes
involved in building a C# or Visual Basic .NET application that uses
an Oracle database, including:
How to add project references to support Oracle class libraries in your .NET project
How to create Oracle Database connection strings
How to work with Connection, Command, and DataReader objects

Resources