Hello

I'm not to experienced with flash programming and I want to look into a task that have been described.
The person has one flash program that is written in CS3. This is in version 2 (I guess Autoscript 2) and need to be upgraded to version 3. I have received the .fla file and want to know a bit more about the challanges around this. The only thing I know is that I apparantly have to use Adobe flash CS6, while doing this job.

My question is:

  • What are the main challanges when upgrading flash from 2 to 3?
  • Is it just to change some syntax, or do the new version require different structure?
  • What version 2 code isn't mainly accepted by version 3?

I'am mostly experienced around c#/ASP.NET and .NET i general.
All answer will be highly appreciated!

Regards Ruben RavnÄ

If I'm imagine the problem right, I would fill the dropdownlists at page_load by calling the DropDownList_Init, and then when a saving gets succeded, I would use postback. Like this:

try
{
con.open();
cmd.ExecuteNonQuery();
}
catch
{
MsgBox("Error")
}
finally
{
Response.Redirect(Request.RawUrl);
}

Thanks a lot. This look very promising. But what is the rule with the LGPL license?

My company is using a simple spreadsheet to write down things from control surveys. Then the data is beeing saved in a big and useless program. Since the data is beeing saved to a database, I want to view this same spreadsheet in a ASP.NET page, with the textboxes filled in. The spreadsheet is so complex graphicly, so i don't think gridview would be the way to go.

Is there anybody that have done something similar. I've been thinking about make a picturebox of the spreadsheet and then have dynamic labels upon it, but I think there should be smarter ways.

I have atatched the file. The survey is beeing done multiple times on the same area, so i wan't the user to be able to choose which date he want to view. But of course this is done simple in SQL.

Hello

I'm planning a programming project for my website.

I have a device that logs information to a database. To access this database I need to use to OLEDB client. What i want to do is, to make a graphical widget to my website that shows the info of my device. I want the widget to update every minute.

I want the widget to show a light, depending on the information at the device, like a traffic light. I'm familiar with c# and know this will do the program task, but i need something that gives me graphic to the website depending on the database, like output from methods in the c# files.

Any one that can help me out here?

No, since the isLast is true. there will only be one row for each section. And i want to compare the section that is in my list. if the list is containing 35 but not 16, it will give 35 as answer, but if 35 and 16 is in the list, the oldest one will be showed.

i've got a new idea. You know in the MS Access you can use query design to make queries. I think if i want to select top 1, like you said to me. i first want to use a for loop to make a query string where all of the numbers in my fj1Sections are represented.

I would need this where part:

WHERE (((dbo_SectionMeasure.BakingFurnaceNo)=1) AND ((dbo_SectionMeasure.IsLastValue)=True)) And ((dbo_SectionMeasure.SectionNo)=1) OR (((dbo_SectionMeasure.SectionNo)=2)) OR (((dbo_SectionMeasure.SectionNo)=3)) OR (((dbo_SectionMeasure.SectionNo)=4)) OR (((dbo_SectionMeasure.SectionNo)=5)) OR (((dbo_SectionMeasure.SectionNo)=6))

and think i can make this part:

((dbo_SectionMeasure.SectionNo)=1) OR (((dbo_SectionMeasure.SectionNo)=2)) OR (((dbo_SectionMeasure.SectionNo)=3)) OR (((dbo_SectionMeasure.SectionNo)=4)) OR (((dbo_SectionMeasure.SectionNo)=5)) OR (((dbo_SectionMeasure.SectionNo)=6))

by:
[CODE]

string wherestring
for (i = 0; i<(fj1Sections.Count;i++){
wherestring += "((dbo_SectionMeasure.SectionNo)="+ fj1Sections[i].ToString() + ") OR";}

wherestring += "((dbo_SectionMeasure.SectionNo)="+ fj1Sections[fj1.Sections.Count].ToString() + ") //Just to don't end with an or.

[/CODE]

and then i just put it in here:

[CODE]
"WHERE (((dbo_SectionMeasure.BakingFurnaceNo)=1) AND ((dbo_SectionMeasure.IsLastValue)=True)) And "+ wherestring
[/CODE]

it's a very long story to describe it.

But lets say my database look like this:

area - section - date
1 4 1-1-2008
1 21 1-3-2008
1 15 1-3-2008
1 34 1-7-2009
1 32 20-7-2010
1 31 20-1-2011

them when i choose 4 i the dropDown the list fj1Section will be made with this values: 1,35,33,32,20,19,17,16,18

then it will go trough the database and go trough the database with section column equal all of the values in fj1Sction list. So in this cage it will only compare row number 4, 5 and 6 and find out section 34 have oldest date.

I've already wrote this code:

[CODE]
richTextBox1.Text = "";
bool test = true;
string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Ruben\Documents\Magic Briefcase\Alcoa\car_mos.accdb;Persist Security Info=False";
string queryString =
"SELECT dbo_SectionMeasure.[BakingFurnaceNo], dbo_SectionMeasure.[SectionNo], dbo_SectionMeasure.[MeasureDate], dbo_SectionMeasure.[IsLastValue] FROM dbo_SectionMeasure WHERE (((dbo_SectionMeasure.[IsLastValue])=True)) ORDER BY dbo_SectionMeasure.[MeasureDate] DESC;";
OleDbConnection connection = new OleDbConnection(connectionString);
OleDbCommand command = connection.CreateCommand();
command.CommandText = queryString;
try
{
connection.Open();
OleDbDataReader reader = command.ExecuteReader();
for (int i = 0; i < fj1Sections.Count; i++)
{
while (reader.Read())
{
string section_no = reader[1].ToString();
if ((section_no == fj1Sections[i].ToString())
{
//result;

                            richTextBox1.Text = "Section: " + fj1Sections[i].ToString() + "       Measurdate " + reader[2].ToString();
                        }

                    }
                }
            }
            catch (Exception ee)
            {
                richTextBox1.Text = ee.ToString();
                throw;
            }

[/CODE]

But like i said minute ago this gives me not what i want.

Okay so it's possible to say that say where should be a whole list. So the program is taking out one value for each number inn the list and is only selecting the one with oldest date?

Cool!

i have one list and one database. The list is made after i've decided a number in a numbericUpDown. So for an example i can get the list

fj1Section:
1
34
33
32
31
20
19
18
17
16

each of this sections exists in the database in the 2. column.

And in the database, each section have a date.

i wan't to find out what's row in the database have the oldest date and the section needs to be the same as one number in my list.

i've made it a little easier in the connection queri, to make the database descending by the date, so it would be enough to check the first item in the database and check if the section number is the same, if not, go to next row.

[CODE]
connection.Open();
OleDbDataReader reader = command.ExecuteReader();
for (int i = 0; i < fj1Sections.Count; i++)
{
while (reader.Read())
{
string section_no = reader[1].ToString();
if ((section_no == fj1Sections[i].ToString())
{
//result;

                            richTextBox1.Text = "Sekction: " + fj1Sections[i].ToString();

                        }

                    }
                }

[/CODE]

I've wrote this code, but it just check the first number in the list and find the date for this section, but most likely, it's not the oldest one.

Any help?

[QUOTE=thines01;1696811]Here's a partial example:
If you have your Area/Section/MeasureDate (ASM) in a collection (datatable, list, etc.)
and your section could be represented as an integer,
and your MeasureDate could be represented as a DateTime
you could do something like this:
[CODE]
// get max date in target range
DateTime maxDate =
(
from a in m_lstASM
where a.intSection >= intUserSelectedSection
select a.dtMeasureDate
).Max(); // << returns ONE value

     // CAsm represents a class or row returning the chosen ASM
     // get record in target range that matches target date
     CAsm asmFound =
     (
        from asm in m_lstASM
        where
           asm.intSection >= intUserSelectedSection
           && asm.dtMeasureDate.Equals(maxDate)
        select asm
     ).FirstOrDefault(); // << returns ONE value

[/CODE][/QUOTE]

Well yes thank you so much. I think this is just what i needed. Now i first need to work on how to get my database as data this code can work whit. I've got some help other place and i have wrote thise code:

[CODE]

        string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\*fileLocation*\car_mos.accdb;Persist Security Info=False";
        string queryString =
            "Select dbo_SectionMeasure.BakingFurnaceNo, dbo_SectionMeasure.SectionNo, dbo_SectionMeasure.MeasureDate, dbo_SectionMeasure.IsLastValue  from dbo_SectionMeasure WHERE (((dbo_SectionMeasure.IsLastValue)=True)); ";
        OleDbConnection connection = new OleDbConnection(connectionString);
        OleDbCommand command = connection.CreateCommand();
        command.CommandText = queryString;
        try
        {
            connection.Open();
            OleDbDataReader reader = command.ExecuteReader();
            while (reader.Read())
            {
                string date = reader[2].ToString();
                DateTime dt = Convert.ToDateTime(date);
                System.TimeSpan diff1 = DateTime.Today.Subtract(dt);

                richTextBox1.Text = richTextBox1.Text + " FurnaceNo " + reader[0].ToString() + "      Section: " + reader[1].ToString() + "       Mmeasurdate " + reader[2].ToString() + "       Days since last measurment: " + diff1.Days + "\n";
            }

            reader.Close();
        }
        catch (Exception ee) ...

I've tried to make a linq to sql class, but i can't drag my table from server explorer. I just get the message "The selected object(s) use an unsopported data provider". Is this because i'm having a MS access database?

Well i've read about it in this guide:

[url]http://www.codeproject.com/KB/linq/LINQSQLCS.aspx[/url]

So i don't need to add local database? Just a linq to sql class?

I'm writing a program has access to a database (a database where an other software stores data that users type). This database has several colums, but in my code, i need to use the two columns that describes where the data is from, and the the date when the data where added. And then my intensjions is that the user type in on place (where the data is from) and, then the program goes trough the database and looks for the oldest dates in that perticular place and places around.

Here is an example of my database:

Area, Section, MeasureDate
1 12 12.05.2009
1 13 15.05.2009
1 14 17.05.2009
1 15 18.05.2009
1 16 19.05.2009

I know how to add the database as a dataset, but not sure how to continue.
If the user now types inn 12 in of my textBoxes and press calculate.

the code first make a list (that contains 12,13,14,15) and then i want it to look for this numbers in the dataset and then which section have the oldest measurment and need "most" to be measured now.

so of this example, my form should give out:

Section 13 at 1 was last measured 12.05.2009 and needs to be measured now.

I'm using Microsoft visual studio 2010, my dataset have the name car_mosDataSet.xsd in the solution explorer.

I would be very grateful for any help, and if i should give more information, just give me a hint.