39 Replies - 950 Views - Last Post: 08 September 2012 - 05:08 AM
#1
What to choose ?
Posted 26 July 2012 - 01:51 AM
I have a project which I will have to make it in VB I'm using Visual Studio 2012 Trial Version only I have to make an application which will run on Desktop PC of a small company I'm confused which database to use?I mean SQL looks fine but I don't have an SQL server and the problem is If I can arrange for one do I have to install the whole server to those PC which the application will be running ?
Replies To: What to choose ?
#2
Re: What to choose ?
Posted 26 July 2012 - 02:32 AM
If you are creating desktop applications that don't require a centralized database server, then you don't want to use a typical SQL Server. You can, however, use things like SQL Server Compact or SQLite. They allow you to use standard SQL queries (with some limitations) but use database files rather than database servers. You can just have them use files on the local file-system to store the data.
Unless I'm mistaken, Visual Studio 2012 should include all that you need to start working with SQL Server Compact databases, so that's probably the best option for you. See the link I posted above for some info on how to use it.
#3
Re: What to choose ?
Posted 26 July 2012 - 03:07 AM
#4
Re: What to choose ?
Posted 26 July 2012 - 03:31 AM
Quote
Yes. VB6 is an old version of Visual Basic that is no longer supported. VB.NET is it's successor. It's what Microsoft is currently supporting, and what all recent versions of Visual Studio have been using.
Quote
The .NET Framework is the core of both the VB.NET and C# languages (as well as several others). When you use "Visual Basic" inside Visual Studio, then you are using VB.NET, which is using the .NET Framework.
#5
Re: What to choose ?
Posted 26 July 2012 - 07:14 AM
#6
Re: What to choose ?
Posted 26 July 2012 - 07:19 AM
#7
Re: What to choose ?
Posted 26 July 2012 - 07:47 AM
#8
Re: What to choose ?
Posted 26 July 2012 - 08:05 AM
dim con as new sqlconnection
#9
Re: What to choose ?
Posted 26 July 2012 - 08:08 AM
DarenR, on 26 July 2012 - 02:19 PM, said:
As I understand him, he's talking about creating a desktop application without a centralized server. Using SQL Server 2008 for that is nothing but trouble, not to mention a major overkill. He's much better of using SQL Server Compact or SQLite.
chdboy, on 26 July 2012 - 02:47 PM, said:
There are plenty of tutorials available that discuss that in detail. It shouldn't take more than a few minutes on Google to locate a few million of those.
In fact, we have on right here on DIC, in the VB.NET Tutorials section.
- SQL Basics In VB.Net
#10
Re: What to choose ?
Posted 26 July 2012 - 08:16 AM
DarenR, on 26 July 2012 - 08:05 AM, said:
dim con as new sqlconnection
I have tried this in my form
Imports System.Data.SqlClient
Public Class AddNewCompany
Inherits System.Windows.Forms.Form
'Create ADO.NET objects.
Private myConn As SqlConnection
Private myCmd As SqlCommand
Private myReader As SqlDataReader
Private results As String
This post has been edited by Atli: 26 July 2012 - 08:18 AM
Reason for edit:: Please use [code] tags when posting code.
#11
Re: What to choose ?
Posted 26 July 2012 - 08:23 AM
Atli, on 26 July 2012 - 11:08 AM, said:
DarenR, on 26 July 2012 - 02:19 PM, said:
As I understand him, he's talking about creating a desktop application without a centralized server. Using SQL Server 2008 for that is nothing but trouble, not to mention a major overkill. He's much better of using SQL Server Compact or SQLite.
you are correct if that is what he is trying to accomplish
#12
Re: What to choose ?
Posted 08 August 2012 - 07:22 AM
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call Login(usernameTextbox.Text, passwordTextbox.Text)
End Sub
and
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call Register(UsernameTextbox.Text, PasswordTextbox.Text)
End Sub
her is the full code
Public Class Form1
Private users As New usersDataSetTableAdapters.credentialsTableAdapter
Private DataSet As New usersDataSet
Private Sub Register(ByVal username As String, ByVal password As String)
Dim Row As usersDataSet.credentialsRow = DataSet.credentials.FindByusername(username)
If Row Is Nothing Then
DataSet.credentials.AddcredentialsRow(username, password)
users.Update(DataSet)
MessageBox.Show("!account created")
Else
MessageBox.Show("username already exists")
End If
End Sub
Private Sub Login(ByVal username As String, ByVal password As String)
Dim Row As usersDataSet.credentialsRow = DataSet.credentials.FindByusername(username)
If Not Row Is Nothing AndAlso Row.password = password Then
MessageBox.Show("Found match ...loging in ")
Else
MessageBox.Show("Match not found ")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call Login(usernameTextbox.Text, passwordTextbox.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call Register(UsernameTextbox.Text, PasswordTextbox.Text)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
users.Fill(DataSet.credentials())
End Sub
End Class
#13
Re: What to choose ?
Posted 08 August 2012 - 07:28 AM
Debugging by proxy is rarely a fun activity for anyone involved.
#14
Re: What to choose ?
Posted 08 August 2012 - 07:30 AM
try something like
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Login(usernameTextbox.Text, passwordTextbox.Text)
End Sub
#15
Re: What to choose ?
Posted 08 August 2012 - 07:35 AM
usernameTextbox is not declared
passwordTextbox is not declared
It is a simple log in form with two text fields username and password
and two buttons Login and Register
If I choose a username and password and hit register it should say account created or else username already exist
but it gives me errors as I have stated above
|
|

New Topic/Question
Reply



MultiQuote








|