View previous topic :: View next topic |
Author |
Message |
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Tue Nov 07, 2006 23:56 Post subject: |
|
|
Papillon,
it doesn't works...i think FindSubString function is buggued...What do you think about ?
Could you use character like $ or % to separate fields, just to test because these characters can be retrieve by FindSubString function ? |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Wed Nov 08, 2006 1:47 Post subject: |
|
|
same here, puting ¬ in the two FindSubString method do nothing more |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Wed Nov 08, 2006 4:07 Post subject: |
|
|
Hi,
Just wanted to say I tried the prototype and it worked great. Nice job. I also installed an ODBC driver for SQL lite and used ODBC explorer to browse the database and verify data, so its a decent rig for prototyping on.
Morph |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Wed Nov 08, 2006 9:03 Post subject: |
|
|
morpheus, did you try to retrieve and parse data with SQLGetData, because insert and update worked but not parsing ? |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Wed Nov 08, 2006 12:35 Post subject: |
|
|
do you have tested the SetPersistentObject and GetPersistentObject ?
for me nothing is written in the sqlite table (i created the table with the val column as blob) |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Wed Nov 08, 2006 16:16 Post subject: |
|
|
yes, it works fine |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Wed Nov 08, 2006 18:23 Post subject: |
|
|
could you give me you SQL script to create the table (to see if my trouble is linked to this)
thanks |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Wed Nov 08, 2006 20:07 Post subject: |
|
|
Papillon,
any idea to solve these problems ? |
|
Back to top |
|
|
yi
Joined: 17 May 2005 Posts: 12 Location: France
|
Posted: Wed Nov 08, 2006 22:31 Post subject: |
|
|
Papillon,
in SQLGetData you have :
Quote: | string sResultSet = GetLocalString(GetModule(), "NWNX_ODBC_CurrentRow"); |
it should be :
Quote: | string sResultSet = GetLocalString(GetModule(), "NWNX_SQL_CurrentRow"); |
no ? _________________ http://www.arkalym.com |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Nov 09, 2006 1:12 Post subject: |
|
|
in fact mostal don't use SetPersistentObject, so it may be a bug on SetPersistentObject
this fonction do nothing in SQLite
any idea papillon, and on the GetSQLData issue too ?
thanks |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Thu Nov 09, 2006 3:28 Post subject: |
|
|
amphiprion wrote: | in fact mostal don't use SetPersistentObject, so it may be a bug on SetPersistentObject
this fonction do nothing in SQLite
any idea papillon, and on the GetSQLData issue too ?
thanks |
The Get/SetPersistantObject() functions require Retrieve/StoreCampaignObject() to work and to be code-hooked seperatly. Currently the functions are commented out by Obsidian and there is no hook, yet.
So, irregarding of the choosen database program, those won't work.
For the GetSQLData, you seem to be correct, he might just have missed to correct that line.
Hey, after all this is a PROTOTYPE, most of the script is just a 1:1 copy of NWNX2 and of course there are still things missing, broken or not implemented yet. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Nov 09, 2006 10:02 Post subject: |
|
|
Actually, the idea for the prototype is that people help themselves. Although I appreciate bug reports, I'm currently not in a situation where I can (or have to) fix bugs in a timely manner. Yes, sql_include is bugged and I haven't tested it. I just included it to demonstrate how that new function class thingy ("NWNX!SQL!...") works, not to actually use it.
More to follow on the weekend.
PS: Please DO keep the reports coming, but do not expect immediate solutions. That way, you do help me the most. _________________ Papillon |
|
Back to top |
|
|
amphiprion
Joined: 07 Nov 2006 Posts: 44 Location: Toulouse (France)
|
Posted: Thu Nov 09, 2006 11:44 Post subject: |
|
|
Senalaya wrote: | The Get/SetPersistantObject() functions require Retrieve/StoreCampaignObject() to work and to be code-hooked seperatly. Currently the functions are commented out by Obsidian and there is no hook, yet. |
Is there is an ETA from Obsidian about uncommented this function ? |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Thu Nov 09, 2006 12:31 Post subject: |
|
|
Nope, just a recent dev post from Rich Taylor, that they are aware of the need, but can't give an ETA.
That goes for all the Get/SetCampaignXxxx() functions, too. |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Fri Nov 10, 2006 5:14 Post subject: |
|
|
yi wrote: | Papillon,
in SQLGetData you have :
Quote: | string sResultSet = GetLocalString(GetModule(), "NWNX_ODBC_CurrentRow"); |
it should be :
Quote: | string sResultSet = GetLocalString(GetModule(), "NWNX_SQL_CurrentRow"); |
no ? |
I wonder if this observation relates to what I am seeing. I am having
trouble getting row data out of sqlite from SQLGetData from a perfectly
valid query (a simple one) that works fine in the sql lite command line.
I do essentially the following:
SQLExecDirect("select * from pwms_quests_conv where tag='"+tag+"' and state<0");
if(SQLFetch()==SQL_SUCCESS) {
int rank = StringToInt(SQLGetData(1));
int parent = StringToInt(SQLGetData(2));
string text = SQLGetData(3);
// none of these columns return data
// even though they should
...
}
I print out the exact query in the game and then run it against the
same database.db file. It doesn't seem to return data in game, even
though the SQLFetch() was successful. I have gotten data from the database, but this query doesn't behave correctly in-game and I'm not
sure why.
Morph
PS. Just caught Papillon's statement about sql_include being bugged and not yet fully working, so take my above post as an observation. |
|
Back to top |
|
|
|