0

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

4
  • This question doesn't really make sense. VB.NET is a language. ASP.NET apps can be written with any .NET language including VB.NET. You probably mean WinForms vs ASP.NET. If that's the case, please edit this post (including title). Commented Feb 4, 2010 at 4:57
  • @Sam, I am quite sure the OP meant what you commented, he/she probably do not know how to express it better. Maybe you can tweak it? :) Commented Feb 4, 2010 at 4:59
  • @o.k.w, Since it totally changes the question, I was hoping the OP would confirm before I "tweaked" it. I'm afraid tweaking won't save this question though--it'll just lead to more questions. Specifically it's not clear if the desktop and server both have a connection to the same database server since the question is about making them connect. Commented Feb 4, 2010 at 5:14
  • i'm sorry for my question.... i'm really new with this vb.net and asp.net.... but what i meant is it possible to make the application(win forms) which is using vb.net and web based using asp.net to connect same database?? is this question make confuse?? Commented Feb 4, 2010 at 6:03

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.