conexion a base de datos y login
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data.SQLite;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace compabetov2.database
|
||||
{
|
||||
internal class Conexion
|
||||
{
|
||||
public SQLiteConnection get_connection()
|
||||
{
|
||||
SQLiteConnection conection = null;
|
||||
|
||||
try
|
||||
{
|
||||
String conectionString = "Data Source=data.db;Version=3;New=True;Compress=True";
|
||||
conection = new SQLiteConnection(conectionString);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
return conection;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user