A question about Zinc specific functionality is going to require someone from MDM or someone who knows their software pretty well. Have you tried asking MDM? I know they don't usually answer questions in their own forums, but they're even more unlikely to answer them here. I would dump out sqlString5 to make sure it contained what I thought it did. Then I would look at the error code returned from the runQuery() function to see why it failed.
When your swf2exe tool just HAS to work
there's only one choice... SWF Studio
The SqlString5 is simple name to var, no problem in other querys, My questions is post in mdm forums and send tu "support", but i not recive response, and i need to.
AHHH MDM ZINC no return me code error !
only no works !
Are you member of Northcode Software ok?
You say me in this post a sample code of connect a MS access database and get data.
The sample is to fast view and weigh the shift to Swf Studio Software.
You say me in this post a sample code of connect a MS access database and get data.
The sample is to fast view and weigh the shift to Swf Studio Software.
Here's an example of how to query an MS Access database in SWF Studio. I've included the ActionScript code below and attached a working FLA and the sample MDB file it needs.
The example dumps the results to our trace window in SWF Studio (using ssDebug.trace) but you could do anything you want with the results. The data is returned in XML format but you can get the data in various formats.
EVERY SWF Studio function returns information that tells you whether the command worked or not. If the command didn't work you get an error code that tells you why so you aren't left stumbling around in the dark.
Code:
ssCore.init();
ssDefaults.synchronousCommands = true;
// Set the connection string for a MS Access database using MS Jet.
// We need to specify a full path to the datasource. The database exists
// in the same folder as our application so we can use ssGlobals.ssStartDir.
ssCore.ADO.setConnectString({connectString:"Provider=Microsoft.Jet.OLEDB.4.0; Persist Security Info=False; Data Source="+ssGlobals.ssStartDir+"\\example.mdb;"});
// execute an SQL query
ssCore.ADO.setSQL({sql:"select * from [2004 Billionaires] where [Name] LIKE 'Wil%'"});
// The values set above are not used until we perform an open command,
// which will connect to the ADO provider and get a recordset.
var return_obj = ssCore.ADO.open();
if (return_obj.success)
{
// if the open completed successfully we get all of the rows from the recordset as XML
return_obj = ssCore.ADO.getRows();
if (return_obj.success)
{
// if there were records to be returned we display them in the SWF Studio Trace tab
ssDebug.trace(return_obj.result);
}
else
{
// if an error occurs we display the description in the SWF Studio Trace tab
ssDebug.trace("ADO.getRows ERROR: "+return_obj.Error.description);
}
}
else
{
// if an error occurs we display the description in the SWF Studio Trace tab
ssDebug.trace("ADO.open ERROR: "+return_obj.Error.description);
// we also display the adoError output parameter for the open method, which will be
// populated if there is an ADO-specific error message returned from the ADO provider
ssDebug.trace(" adoError: "+return_obj.adoError);
}
The output from ADO.getRows looks like this (below). If you have a lot of data you can also get the data one row at a time instead of all in one call.
I see this is old but being a newbie, may I ask for help on this.
I need to create a login system for a Zinc Desktop App using MySQL Database.
The Login Form has a Username Field and a Password Field. I want the App to First make sure that the Username entered does exist. If it is not found in the Database, the user must be told that the username entered is not found in the Database and also offer the user an option to register, or just re-enter the username. If the Username was found, then it must be matched with the password. If it doesn't match, the App must tell that the password is incorrect and offer options to re-enter or recover the Password.
My problem is writing the code in Flash for this function.
1) How do I write a SELECT statement in Flash AS2 to find the Username in the Database?
2) After the SELECT statement, how do I get it's results in order to determine whether the Username does or not exist and so inform the User accordingly?
My problem is writing the code in Flash for this function.
1) How do I write a SELECT statement in Flash AS2 to find the Username in the Database?
2) After the SELECT statement, how do I get it's results in order to determine whether the Username does or not exist and so inform the User accordingly?
Zinc, and other SWF2EXE applications that do the same job, provide ActionScript libraries that expose the functionality of the SWF2EXE tool.
In the example above, I've shown the SWF Studio commands you would need to talk to any database that you have an ADO provider for. in this case it was an Access database but there are ADO providers for every major database out there.
To query a MySQL database using Zinc you'll have to find the Zinc commands that let you access the MySQL database. Then you'll need to find an example that shows you how to perform a query and read the results as well update the database to do what you want.
My answer to clydde showed how to query an Access database and look at the results. This sample example can be made to work with MySQL by changing just the connection string (assuming the database in MySQL was the same as the Access database). That's the beauty of using ADO for your database access, it's pretty much database agnostic.
When your swf2exe tool just HAS to work
there's only one choice... SWF Studio