Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool LogearseFirebird(string Cif, string PWD)
- {
- bool oReturn = false;
- string connString =
- "User=SYSDBA;" +
- "Password=masterkey;" +
- "Database=C:\FirebirdDB\USUARIOS.FDB;" +
- "DataSource =localhost;" +
- "Port=3050;" +
- "Dialect=3;" +
- "Charset=NONE;" +
- "Role=;" +
- "Connection lifetime=15;" +
- "Pooling=true;" +
- "MinPoolSize=0;" +
- "MaxPoolSize=50;" +
- "Packet Size=8192;" +
- "ServerType=0;";
- FbConnection conn = new FbConnection(connString);
- conn.Open();
- String sql = "SELECT NOMBRE FROM TBL_USUARIOS WHERE CIF=" + Cif + "AND CONTRASENYA=" + PWD;
- FbCommand com = new FbCommand(sql, conn);
- FbDataReader dr = com.ExecuteReader();
- if (dr.Read())
- {
- oReturn = true;
- }
- dr.Close();
- conn.Close();
- Console.ReadLine();
- return oReturn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement