PDA

View Full Version : Conneting to SQLDB help!!


shakazulu89
04-12-2008, 06:11 PM
hello hello
i am fairly new to flex, but have read a lot and know where to get help resources from..
i couldnt figure out why ive been getting this error:

i am trying to set up a connectiong to SQLdb file that ive created using SQL..
it is called TimeLog..
This is the code i used:

import flash.data.SQLConnection;
import flash.data.SQLMode;
import flash.events.SQLErrorEvent;
import flash.events.SQLEvent;
import flash.filesystem.File;


public var conn:SQLConnection = new SQLConnection();
public var timeLogsDB:File = new File("C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\TimeLog");

try
{
conn.open(timeLogsDB , SQLMode.UPDATE);
trace("the db opened!!");
}
catch (error:SQLError)

{
trace("Error Message:" , error.message);
trace("Details:" , error.details);
}

and the error i get is on the first line after the try statement:
error 1120 access of undefined property conn
error 1120 access of undefined property timeLogsDB

can someone please help me here.. the only thing i can think of is that im pointing to the file directory the wrong way ...
anyway any help would be appreciated...
thanks :)