473,831 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Jet Rep Object. ( change password)

I get an "Could not find installable ISAM." But the error does not make
sense. to me. I converted this code to C# that I found on the internet:
( http://www.vbcity.com/forums/faq.asp...ccess#TID42009 )
What might be wrong ?
I have a reference to msjro.dll version 2.81.1117.0 which show up as
interop.jro in my references.
THE FUNCTION:
public bool changePassword( string SourceDB,string DestDB,string
OldPswd,string NewPswd)
{
bool retval=false;
string SourceCNN;
string DestCNN;

JRO.JetEngine jro = new JRO.JetEngine() ;

// delete the backupfile if exists
try
{
if (File.Exists(De stDB)==true)
{ File.Delete(Des tDB);}
// Build the connection strings
SourceCNN="Prov ider=Microsoft. Jet.OLEDB.4.0" + ";Data Source=" + SourceDB +
";Jet OLEDBatabase Password=" + OldPswd;
DestCNN="Provid er=Microsoft.Je t.OLEDB.4.0" + ";Data Source=" + DestDB +
";Jet OLEDBatabase Password=" + NewPswd;
// Create the replica with the new password
jro.CompactData base(SourceCNN, DestCNN);
// overwrite the old one with the new one and delete the temp.
File.Delete(Sou rceDB);
File.Copy(DestD B,SourceDB,true );
File.Delete(Des tDB);
retval=true;
}
catch( Exception e )
{
Console.WriteLi ne(e.Message);
}
return retval;
}

--
Thanks Andrew
Nov 16 '05 #1
1 1738
The connection strings were misspelled: should have been:
// Build the connection strings
SourceCNN="Prov ider=Microsoft. Jet.OLEDB.4.0" + "; Data Source=" +
SourceDB + "; Jet OLEDB:Database Password=" + OldPswd;
DestCNN="Provid er=Microsoft.Je t.OLEDB.4.0" + "; Data Source=" + DestDB +
"; Jet OLEDB:Database Password=" + NewPswd;

"andrewcw" wrote:
I get an "Could not find installable ISAM." But the error does not make
sense. to me. I converted this code to C# that I found on the internet:
( http://www.vbcity.com/forums/faq.asp...ccess#TID42009 )
What might be wrong ?
I have a reference to msjro.dll version 2.81.1117.0 which show up as
interop.jro in my references.
THE FUNCTION:
public bool changePassword( string SourceDB,string DestDB,string
OldPswd,string NewPswd)
{
bool retval=false;
string SourceCNN;
string DestCNN;

JRO.JetEngine jro = new JRO.JetEngine() ;

// delete the backupfile if exists
try
{
if (File.Exists(De stDB)==true)
{ File.Delete(Des tDB);}
// Build the connection strings
SourceCNN="Prov ider=Microsoft. Jet.OLEDB.4.0" + ";Data Source=" + SourceDB +
";Jet OLEDBatabase Password=" + OldPswd;
DestCNN="Provid er=Microsoft.Je t.OLEDB.4.0" + ";Data Source=" + DestDB +
";Jet OLEDBatabase Password=" + NewPswd;
// Create the replica with the new password
jro.CompactData base(SourceCNN, DestCNN);
// overwrite the old one with the new one and delete the temp.
File.Delete(Sou rceDB);
File.Copy(DestD B,SourceDB,true );
File.Delete(Des tDB);
retval=true;
}
catch( Exception e )
{
Console.WriteLi ne(e.Message);
}
return retval;
}

--
Thanks Andrew

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2422
by: MLH | last post by:
What's the simplest way to allow a user of an A97 app to change password?
10
9896
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
5
20278
by: Ram | last post by:
Hey, I'v managed to set the "User Must Change Password At Next Logon" flag on the LDAP protocol, Using the - "pwdLastSet" property - by setting it to - "0" (for on) or - "-1" (for off). The problem is, I dont know how to check what's the current status of this user - When I try and read this property from the user's DirectoryEntry, I get a "System.ComObject" object, and I cant get any data from this object. Does Anyone has an idea what...
0
3686
by: GregS | last post by:
We have a client that has a very large number of users that will be connecting back to the domain via VPN only. The problem is that the communications vendor can not pass the password expiration notice back to the client. What we would like to do is run a script or application after the vpn tunnel is established that checks the number of days remaining before the password expires and then give the user a prompt to change their password when a...
1
6457
by: Ram | last post by:
Hey, I'v managed to set the "User Must Change Password At Next Logon" flag on the LDAP protocol, Using the - "pwdLastSet" property - by setting it to - "0" (for on) or - "-1" (for off). The problem is, I dont know how to check what's the current status of this user - When I try and read this property from the user's DirectoryEntry, I get a "System.ComObject" object, and I cant get any data from this object. Does Anyone has an idea what...
3
4184
by: Xnet | last post by:
I need to change password of a local user of a W2003, without Active Directory. I need to do it from an application created with VB2005. Thanks!
2
1712
by: yasinirshad | last post by:
Hi, Please see my below code to change password. Here i need to check for old password from database and need to update new password. But when i try to submit by giving wrong old password ,its redirecting me to PasswordSet.aspx whereas it shd give message Invalid Old Password. It shd redirect me only when user gives correct old password and enters new password. please help. Private Sub btn_submit_ServerClick(ByVal sender As System.Object, ByVal...
2
5079
by: bemytthm | last post by:
I just want to ask abt communicate with AD using ASP.net. I would want to ask you all to help me correct a problem like this: This is a code i use to change password on AD public bool ChangePasswordAD(string strLogin, string strOldPasswd, string strNewPasswd) { try { string domainAndUsername = "aloha.com" + @"\" + strLogin; DirectoryEntry entry = new...
7
4399
by: Jesse Jones | last post by:
Any ideas on how to send info from one form into another domain or how to write a default value for a new user's password with a formula? Here's what I'm trying to do: design my database so that a new employee record has a password generated with a formula (obviously, not one that is published). On the employees table is a true false declaring if the user's password needs changed. The default value is true. So when I create a new record (add...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10494
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10534
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9317
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5619
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.