using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
using DPUruNet;
using System.Drawing.Imaging;
using System.Drawing;
namespace UareUBiometrics
{
class HelperFunctions
{
private static Fmd[] fmds;
private static Fmd[] allDBFmds;
public static Fmd[] GetAllFmds
{
get { return allDBFmds; }
}
private static string[] allUserNames;
public static string[] GetAllUserNames
{
get { return allUserNames; }
}
private static int[] allfingerIDs;
public static int[] GetallfingerIDs
{
get { return allfingerIDs; }
}
public static MySqlDataReader ConnectDBnExecuteSelectScript(string Script)
{
string connectionString = "server=localhost;User Id=root;database=customerInfo;Password=";
MySqlDataReader dataReader = null;
MySqlConnection conn = new MySqlConnection(connectionString);
try
{
conn.Open();
MySqlCommand sqlCommand = new MySqlCommand(Script, conn);
dataReader = sqlCommand.ExecuteReader(CommandBehavior.CloseConnection);
}
catch (MySqlException ex)
{
MessageBox.Show("Error opening connection" + ex.Message);
}
return dataReader;
}
shhh 0 Light Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
kyle.santelices.31 0 Newbie Poster
kyle.santelices.31 0 Newbie Poster
TnTinMN 418 Practically a Master Poster
TnTinMN 418 Practically a Master Poster
samsylvestertty 12 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.