Hi Trevor (or whoever else responds),
I've had SQL Yoga working great in a stack that I now have to rename and move to a different folder, so I need to change the path to my database. This is for an iOS app, but I connect to the db in the IDE so that SQL Yoga is loaded and the database connection is available. So if I'm in the IDE, I set the path accordingly. It's that path I need to change. I tried changing it in my dbconn_set "file" call, but everything just went haywire (this is for a SQLite db, btw). I am saving the database object settings in a button. Is there something in those settings that also has to change? If so, what's the proper procedure?
Thanks,
Chris Sheffield
How to change the database path
Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, trevordevore
-
- VIP Livecode Opensource Backer
- Posts: 8
- Joined: Mon Apr 10, 2006 3:35 pm
- Location: Idaho Falls, ID
How to change the database path
Chris Sheffield
Read Naturally, Inc.
The Fluency Company
Read Naturally, Inc.
The Fluency Company
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: How to change the database path
To change the path to the database file you do want to set the "file" property of the database connection object. SQL Yoga will disconnect from the database prior to reassigning the path. So it sounds like you are dong the right thing. Can you define what "haywire" means?
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
- VIP Livecode Opensource Backer
- Posts: 8
- Joined: Mon Apr 10, 2006 3:35 pm
- Location: Idaho Falls, ID
Re: How to change the database path
Well, I feel foolish. I tried this yesterday and couldn't get it to work. When I opened my stack after changing the path and saving, I couldn't get a valid connection and I was receiving an error about an object not being valid (I apologize; I don't have the exact wording). Anyway, I just tried it again and it's working fine. The only thing I can think of is that I used a bad folder name in my path or something.
So thanks for the quick response, and sorry for the bother.
Take care.
So thanks for the quick response, and sorry for the bother.
Take care.
Chris Sheffield
Read Naturally, Inc.
The Fluency Company
Read Naturally, Inc.
The Fluency Company
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
Re: How to change the database path
Glad you got it working.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder