Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

UDK - DLLBind: Embedded database (SQLite,MySQL) v3.1.0.2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    http://www.youtube.com/watch?v=2A4lPbEdBMk
    just a small progress, MySQL


    @Chaosnet: Stored Procedures are part of the choosen DBMS to be used ... SQLite isn't able afaik, but MySQL should be able.
    So you will be able to use them with the new MySQL driver, yes. (not tested tbh, just an assumption at the moment)

    Comment


      I just wanted to chime in here and offer my huge thanks for your work on this.. This is such an awesome resource to have on hand. thank you again!

      Comment


        Originally posted by BlackHornet80 View Post
        Really need more testers for this, for a wider setup up test cases.

        Actually I did some additional changes that will be awesome, but I won't release it untested. So if there are one or two people joining the test, it would be a great help for me.

        Testers should be familiar with the actual version, maybe had set up or running a small project in the past.


        thanks in advance
        BlackHorent
        Thanks for your work on this!I want to join the test, can you send materials to me? My Email is "msygood152@163.com",thank you!

        Comment


          First, thank you so much for this!


          And have some questions.

          Made a DB for my game and like this.


          And I wanted to get PCName by Slot Number.


          So I scripted in US like this.

          Code:
          CharacterDB.SQL_initSQLDriver(SQLDrv_SQLite);
          CharacterDB.SQL_selectDatabase(0);
          
          function string GetPCNameInfo( optional int Slot = -1)
          {
          	local string LS;
          	LS = class'SQLProject_Defines'.static.initString(30);
          	if ( Slot != -1 ){
          		CharacterDB.SQL_queryDatabase("SELECT * FROM CharacterList WHERE CharacterList.Slot = '"$Slot$"';");
          		CharacterDB.SQL_getStringVal("PCName", LS);
          		return LS;
          	}
          }
          But result of function is always null or empty.

          How do I fix it?

          Thanks again.

          Click image for larger version

Name:	cap.jpg
Views:	1
Size:	36.9 KB
ID:	3248651

          Comment


            I assume you have tested your SQL statement within a "normal" database tool and got correct results.
            In case of the DLLBind, you will have to do the following to access the result:

            Code:
            CharacterDB.SQL_initSQLDriver(SQLDrv_SQLite);
            CharacterDB.SQL_selectDatabase(0);
            
            function string GetPCNameInfo( optional int Slot = -1)
            {
            	local string LS;
            
            	LS = class'SQLProject_Defines'.static.initString(30);
            	if ( Slot != -1 ){
            		CharacterDB.SQL_queryDatabase("SELECT * FROM CharacterList WHERE CharacterList.Slot = '"$Slot$"';");
            
            		// This is needed, but just get one valid result (do the break)!!
            		while(mDLLAPI.SQL_nextResult())
            		{
            			CharacterDB.SQL_getStringVal("PCName", LS);
            			break;
            		}
            	}
            
            	return LS;
            }
            Hope this helps a little bit.

            Comment


              Originally posted by BlackHornet80 View Post
              I assume you have tested your SQL statement within a "normal" database tool and got correct results.
              Thank you so much, it really helpful!

              btw When end of PIE type 'quit' on console command or Escape key, Engine(UDK.exe) occur 'program-stopped-error', is it normal??

              Or need some shut down progress for SQLite DB?

              Thanks again.


              ADD. Nothing problem on cooked game.
              but I'm wonder why.

              Comment


                if you might use version 2.0.1.0 this could happen yes, PIE problem is fixed in later versions, including the planned release of 3.1.0.1

                Comment


                  I'm really expect next release, include encryption and bug fix!

                  Thank you for your work!

                  Comment


                    **here was fooly question!sorry**

                    Comment


                      Just saw this video : http://www.youtube.com/watch?v=2A4lPbEdBMk

                      Any progress on that? and will that be included in the next update?

                      Comment


                        I have a problem.
                        There is nothing happens when i trying to execute UPDATE query.
                        There is no errors while compiling and UPDATE query is correct (tested through Navicat).
                        After query i'm saving loaded database to file with SQL_saveDatabase(file);

                        But when i'm opening database file in Navicat, there is no changes there.

                        Please help.

                        Comment


                          Here is the code :
                          Code:
                          function bool SaveCharLocation(int charid,vector newLoc)
                          {
                          	local int x,y,z;
                          	
                          	if(!sqlAPI.SQL_selectDatabase(gamedatabase))
                          	{
                          		`Log("DB selection error.");
                          		return false;
                          	};
                          	
                          	x=int(newLoc.x);
                          	y=int(newLoc.y);
                          	z=int(newLoc.z);
                          	
                          	//UPDATE 'main'.'characters' SET 'x'=1, 'y'=1, 'z'=1 WHERE ('charid'=1)
                          	if(sqlAPI.SQL_queryDatabase("UPDATE 'main'.'characters' SET 'x'="$x$", 'y'="$y$", 'z'="$z$" WHERE ('charid'="$charid$")"))
                          	{
                          		`Log(charid$"'s location saved as "$x$" "$y$" "$z$" by SQLApi '"$sqlAPI$"'");
                          		`Log("DB File saving to :"$sqlfilemanager.gamedb_file);
                          		return true;
                          	} else {
                          		return false;
                          	}
                          	sqlAPI.SQL_saveDatabase(sqlfilemanager.gamedb_file);
                          	
                          }

                          Comment


                            I cant understand...IS there are no one want to help me?Or you just dont know how to?

                            Comment


                              Originally posted by mQe View Post
                              Just saw this video : http://www.youtube.com/watch?v=2A4lPbEdBMk

                              Any progress on that? and will that be included in the next update?
                              it is, yes

                              @royalwing9111: you return the function true/false before the database is saved!

                              Comment


                                Originally posted by BlackHornet80 View Post
                                it is, yes

                                @royalwing9111: you return the function true/false before the database is saved!

                                RAAAAGE!!!I am so stupid! T_T

                                Thank you

                                Comment

                                Working...
                                X