Click here to Skip to main content
15,896,606 members
Home / Discussions / C#
   

C#

 
AnswerRe: Error : Database Rollbacks Automatically After Exectuion of C# code Pin
Dave Kreskowiak23-Apr-12 7:05
mveDave Kreskowiak23-Apr-12 7:05 
QuestionGenerate all possible combination A-Z0-9 with 16 length(Permutations) Pin
jojoba201122-Apr-12 18:10
jojoba201122-Apr-12 18:10 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
Pete O'Hanlon22-Apr-12 19:10
mvePete O'Hanlon22-Apr-12 19:10 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
BobJanova22-Apr-12 22:33
BobJanova22-Apr-12 22:33 
GeneralRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
Lutosław23-Apr-12 11:48
Lutosław23-Apr-12 11:48 
GeneralRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
BobJanova24-Apr-12 0:10
BobJanova24-Apr-12 0:10 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
Dave Kreskowiak23-Apr-12 6:58
mveDave Kreskowiak23-Apr-12 6:58 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
jschell23-Apr-12 10:53
jschell23-Apr-12 10:53 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
Lutosław23-Apr-12 11:43
Lutosław23-Apr-12 11:43 
AnswerRe: Generate all possible combination A-Z0-9 with 16 length(Permutations) Pin
Lutosław23-Apr-12 12:29
Lutosław23-Apr-12 12:29 
Questionhandling ctrl+mouse click on webbrowser control in winform Pin
hoangminhtoan22-Apr-12 17:11
hoangminhtoan22-Apr-12 17:11 
AnswerRe: handling ctrl+mouse click on webbrowser control in winform Pin
VJ Reddy22-Apr-12 20:06
VJ Reddy22-Apr-12 20:06 
GeneralRe: handling ctrl+mouse click on webbrowser control in winform Pin
hoangminhtoan22-Apr-12 22:11
hoangminhtoan22-Apr-12 22:11 
GeneralRe: handling ctrl+mouse click on webbrowser control in winform Pin
VJ Reddy22-Apr-12 22:58
VJ Reddy22-Apr-12 22:58 
GeneralRe: handling ctrl+mouse click on webbrowser control in winform Pin
hoangminhtoan22-Apr-12 23:12
hoangminhtoan22-Apr-12 23:12 
QuestionAny free GS-1 Databar classes? Pin
nickslick22-Apr-12 10:17
nickslick22-Apr-12 10:17 
AnswerRe: Any free GS-1 Databar classes? Pin
DaveyM6922-Apr-12 11:49
professionalDaveyM6922-Apr-12 11:49 
GeneralRe: Any free GS-1 Databar classes? Pin
nickslick22-Apr-12 12:02
nickslick22-Apr-12 12:02 
Questionabout a code Pin
Gayani Udawatta22-Apr-12 4:26
Gayani Udawatta22-Apr-12 4:26 
AnswerRe: about a code Pin
Richard MacCutchan22-Apr-12 4:33
mveRichard MacCutchan22-Apr-12 4:33 
GeneralRe: about a code Pin
PIEBALDconsult22-Apr-12 6:46
mvePIEBALDconsult22-Apr-12 6:46 
GeneralRe: about a code Pin
Richard MacCutchan22-Apr-12 21:01
mveRichard MacCutchan22-Apr-12 21:01 
AnswerRe: about a code Pin
PIEBALDconsult23-Apr-12 3:14
mvePIEBALDconsult23-Apr-12 3:14 
GeneralRe: about a code Pin
Lutosław23-Apr-12 11:04
Lutosław23-Apr-12 11:04 
Questionconnect to access database Pin
MemberDotNetting22-Apr-12 3:39
MemberDotNetting22-Apr-12 3:39 
I want to retrieve the name of the database from a text box (datasource = txtdatabase.text), but the connection does not work.
the connection is made ​​with the direct assignment of name database directly
cnx = new OleDbConnection ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = D: \ \ mabase.mdb");


C#

class Connexion
{
static public OleDbConnection cnx;
static bool ok;

static public Boolean getConnexion()
{
if (cnx == null)
{
cnx = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+datasource);
try
{
cnx.Open();
ok = true;
}
catch (OleDbException)
{
ok = false;
}
}
return ok;
}
}

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.