Point of the Database Manager?!?

Got a question or comment about PowerChurch that doesn't belong anywhere else? Why not post it here!?

Moderators: Moderators, Tech Support

Locked
alexhortdog95
Posts: 7
Joined: Wed Jan 03, 2018 7:39 pm

Point of the Database Manager?!?

Post by alexhortdog95 »

Hello all,

I'm wondering - what is the purpose of including the Database Manager functionality if you can't really utilize it?

I'm a 15+ year Application Developer with some proficiency in SQL CRUD operations, but I'm scratching my head at why it's in there....

I'd love to do a simple:

UPDATE ME
SET e_mail = 'some@email.here'
WHERE env_no = '123'

I've tried running this and nothing. I'm able to download the information into an Access DB and build queries and forms that way, but that being said, why would I even need to run PowerChurch at that point?

I've seen numerous posts on these forums where the suggestion is to contact PowerChurch directly (I'm sure at some cost) to have them help you.

Please share thoughts? Thank you .

Zorak
Tech Support
Tech Support
Posts: 3006
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Point of the Database Manager?!?

Post by Zorak »

The SQL query you listed with a couple of adjustments would successfully update that person's (or actually everyone who has that envelope number assigned) e-mail address. ENV_NO is an integer, not a string, so remove the quotes from that. Also, no line breaks, or if you want line breaks, you must put a semicolon (;) to tell it to continue on to the next line.

UPDATE ME SET E_MAIL="SOME@EMAIL.HERE" WHERE ENV_NO = 123

FBCoA4058
Posts: 4
Joined: Fri Jan 15, 2016 5:09 pm

Re: Point of the Database Manager?!?

Post by FBCoA4058 »

I regularly use the Database Manager tool for several things. I know it is a powerful tool and you need to understand the risks before using it. Please leave the functionality in the software for those of us who use it every now and then.

NeilZ
Posts: 10209
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Point of the Database Manager?!?

Post by NeilZ »

AFAIK ... removing the DB manager has never been rumored about, so don't worry.
Neil Zampella

Using PC+ since 1999.

Zorak
Tech Support
Tech Support
Posts: 3006
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Point of the Database Manager?!?

Post by Zorak »

It's not available in PowerChurch Online, since there isn't a way to limit access to only your files on our server, but other than that, the desktop PowerChurch Plus will continue to have the database manager.

alexhortdog95
Posts: 7
Joined: Wed Jan 03, 2018 7:39 pm

Re: Point of the Database Manager?!?

Post by alexhortdog95 »

Thanks for this!
Also -
FBCoA4058 wrote:I regularly use the Database Manager tool for several things. I know it is a powerful tool and you need to understand the risks before using it. Please leave the functionality in the software for those of us who use it every now and then.
I downloaded a separate copy of our DB for proof of concept type stuff. I was attempting to do a mass update of information (or find the most effective way to do it), and I stumbled across this.

I ended up just manually doing them, but we will have to tackle this in another 6 months for yearly statements :mrgreen:

alexhortdog95
Posts: 7
Joined: Wed Jan 03, 2018 7:39 pm

Re: Point of the Database Manager?!?

Post by alexhortdog95 »

Okay, I must just be confused (wouldn't be the first time, :lol: )

I tried an update similar to this one:

UPDATE ME SET E_MAIL='abc@email.net' WHERE ENV_NO = 1;
UPDATE ME SET E_MAIL='123@email.com' WHERE ENV_NO = 2;
UPDATE ME SET E_MAIL='456@email.com' WHERE ENV_NO = 3;
UPDATE ME SET E_MAIL='789@email.net' WHERE ENV_NO = 9;
UPDATE ME SET E_MAIL='def@email.net' WHERE ENV_NO = 11;
UPDATE ME SET E_MAIL='ghi@gmail.com' WHERE ENV_NO = 26

And I get "Error:Command contains unrecognized phrase/keyword."

When I take all of the lines out, and leave the first line in without my semicolon, I get this:

"Updated 1 record in 0.02 seconds"

NeilZ
Posts: 10209
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Point of the Database Manager?!?

Post by NeilZ »

[quote="alexhortdog95"]Okay, I must just be confused (wouldn't be the first time, :lol: )

I tried an update similar to this one:

UPDATE ME SET E_MAIL='abc@email.net' WHERE ENV_NO = 1;
UPDATE ME SET E_MAIL='123@email.com' WHERE ENV_NO = 2;
UPDATE ME SET E_MAIL='456@email.com' WHERE ENV_NO = 3;
UPDATE ME SET E_MAIL='789@email.net' WHERE ENV_NO = 9;
UPDATE ME SET E_MAIL='def@email.net' WHERE ENV_NO = 11;
UPDATE ME SET E_MAIL='ghi@gmail.com' WHERE ENV_NO = 26

And I get "Error:Command contains unrecognized phrase/keyword."

When I take all of the lines out, and leave the first line in without my semicolon, I get this:

"Updated 1 record in 0.02 seconds"[/]

I'm not sure that it will accept more than one command at a time. It was intended for quick queries, and mass updates. I'm not sure its good for multiple individual updates.

FWIW .. I'd have the secretary update the database between now, and the end of the year.
Neil Zampella

Using PC+ since 1999.

Zorak
Tech Support
Tech Support
Posts: 3006
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Point of the Database Manager?!?

Post by Zorak »

Take the semicolons off the end of those update statements. In Visual FoxPro, a semicolon indicates a line break within the same statement, not an end of statement like it does in every other programming language I've seen.

Also, you will want to wrap those e-mail addresses in LOWER() because the Database Manager will convert everything to uppercase. Command below is tested and works:

Code: Select all

UPDATE ME SET E_MAIL=LOWER('abc@email.net') WHERE ENV_NO = 1
UPDATE ME SET E_MAIL=LOWER('123@email.com') WHERE ENV_NO = 2
UPDATE ME SET E_MAIL=LOWER('456@email.com') WHERE ENV_NO = 3
UPDATE ME SET E_MAIL=LOWER('789@email.net') WHERE ENV_NO = 9
UPDATE ME SET E_MAIL=LOWER('def@email.net') WHERE ENV_NO = 11
UPDATE ME SET E_MAIL=LOWER('ghi@gmail.com') WHERE ENV_NO = 2

Locked