Multiple or Only One NoSQL DB for one App ?

0 votes

Hello,

Can we have multiple NoSQL DB for one app or not ?
The interface in apphq.shephertz.com seems to suggest so ( no Db created by default & drop downlist to choose DB ).
The API also requires us to enter the Database name everytime we make a request.

However when i try to save data in a Database using :
                        App42User user;
                        user.userName = sud->m_userid.c_str();
                        App42Object* app42Object = new App42Object();
                        app42Object->setObject("user_id", sud->m_userid.c_str());
                        app42Object->setObject("data", sud->m_user_data.c_str());
                        const char* dbName = "PLAYERS";
                        const char* collectionName = "Data";
                        App42API::setDbName(dbName);
                        m_service->AddUserInfo(app42Object, collectionName);
                        m_service->createOrUpdateProfile(&user, sud->m_cb);

I get the error :
"app42Fault":{"httpErrorCode":400, "appErrorCode":2610,"message":"Bad Request","details":"The request parameters are invalid. Storage '[PUBLIC]' already exists."}

asked Jul 24, 2014 in App42 Cloud API-BaaS by asmodehn (15 points)

1 Answer

0 votes
Hi Asmodehn,
 
Thanks for writing to us, 
 
No You can only have one DB per App. Looking at the error it seems you have already created a DB with name “PUBLIC”. You have to use this DB name while doing any operation.
 
Let me know if it solves your problem.
 
Thanks,
/Naresh
 
answered Jul 24, 2014 by naresh (350 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...