thank you for every one replies ......
But when i execute the code in C# it gives me Error ?
(Jul 18, 2020 07:23 PM)VENI Wrote: You can solve this yourself, here are the steps:
1. Create a new console app in visualStudio in C#(Dont forget to add a reference to Microsoft.VisualBasic)
2. Copy and paste that code you provided into the console app and simply print the result.
For example,
string str2 = string str2 = Conversions.ToString(123) + "\x0001\x001e" + Conversions.ToString(Strings.Chr(246)) + "\x0003\r$\x0003\n" + Conversions.ToString(Strings.Chr(227)) + "\r" + Conversions.ToString(Strings.Chr(244)) + "%" + Conversions.ToString(Strings.Chr(230)) + "\x001e5";
Console.WriteLine(str2);
or if you want to write it to a file do whatever you want with it like File.WriteAllText(output.txt, str2);
this is the full code i need to know to know the password ?
public static string getconnection(string path, typeconn type)
{
string str;
try
{
switch (type)
{
case typeconn.acc2007:
return ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\"" + path.ToString() + "\";Jet OLEDB:Database Password=123123");
case typeconn.acc2003:
{
string str2 = Conversions.ToString(0x7b) + "\x0001\x001e" + Conversions.ToString(Strings.Chr(0xf6)) + "\x0003\r$\x0003\n" + Conversions.ToString(Strings.Chr(0xe3)) + "\r" + Conversions.ToString(Strings.Chr(0xf4)) + "%" + Conversions.ToString(Strings.Chr(230)) + "\x001e5";
return ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + path.ToString() + "\";Persist Security Info=True;Jet OLEDB:Database Password='" + str2 + "';");
}
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
str = Conversions.ToString(false);
ProjectData.ClearProjectError();
}
return str;
}
(Jul 18, 2020 09:11 PM)VENI Wrote: This should be easier to use https://dotnetfiddle.net/
Look to the full code
I need to open 2003.mdb database
public static string getconnection(string path, typeconn type)
{
string str;
try
{
switch (type)
{
case typeconn.acc2007:
return ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\"" + path.ToString() + "\";Jet OLEDB:Database Password=123123");
case typeconn.acc2003:
{
string str2 = Conversions.ToString(0x7b) + "\x0001\x001e" + Conversions.ToString(Strings.Chr(0xf6)) + "\x0003\r$\x0003\n" + Conversions.ToString(Strings.Chr(0xe3)) + "\r" + Conversions.ToString(Strings.Chr(0xf4)) + "%" + Conversions.ToString(Strings.Chr(230)) + "\x001e5";
return ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + path.ToString() + "\";Persist Security Info=True;Jet OLEDB:Database Password='" + str2 + "';");
}
}
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
str = Conversions.ToString(false);
ProjectData.ClearProjectError();
}
return str;
}