Tuesday, December 6, 2011

trying to migrate from php to asp.

Hello,

Can any one fill in some missing gaps for me!? I ve been
working PHP for a few years now, however a client has approached me
to make some mods to there site that has been developed using asp.
Im trying to feel my way through it all!

Each asp file calls a file called
dsn.database.inc, which contains:


%26lt;%

Set dbConnection = Server.CreateObject(''ADODB.Connection'')

dbConnection.Provider = ''Microsoft.Jet.OLEDB.4.0''

dbConnection.Open
''\\xxxx\xxxxxx\x\xxxxxxxxxxxxxxx.net\user\htdocs\sitebuilder.mdb''



Server.ScriptTimeout = 300



%%26gt;




now im using a mac, so i think i will strugle to use a local
ODBC !? correct!?

when establishing a connnection in DWMX, i pressumed i would
selct DSN connection, name it and in the DSN box take from the
above file
\\xxxx\xxxxxx\x\xxxxxxxxxxxxxxx.net\user\htdocs\sitebuilder.mdb''



not that simple apparently! this doesnt work!!



What have i overlooked!?

Thanks

Davetrying to migrate from php to asp.
I think you've been confused by the name of the include file.
That

connection does not use a DSN; it doesn't make use of DW's
connection string

functions, either. If you want DW to make a connection,
you'll have to

create it yourself as a customer connection. Look at

www.connectionstrings.com for the proper format for a
''DSN-less'' connection

to Access. I don't remember all of it off the top of my head.





''davebusey'' %26lt;webforumsuser@macromedia.com%26gt; wrote in
message

news:euarsf$mbc$1@forums.macromedia.com...

%26gt; Hello,

%26gt; Can any one fill in some missing gaps for me!? I ve been
working PHP for

%26gt; a

%26gt; few years now, however a client has approached me to
make some mods to

%26gt; there

%26gt; site that has been developed using asp. Im trying to
feel my way through

%26gt; it all!

%26gt; Each asp file calls a file called
dsn.database.inc, which contains:

%26gt;
%26lt;%

%26gt; Set dbConnection =
Server.CreateObject(''ADODB.Connection'')

%26gt; dbConnection.Provider = ''Microsoft.Jet.OLEDB.4.0''

%26gt; dbConnection.Open

%26gt;
''\\iis685\domains\p\premierteamsports.net\user\htdocs\sitebuilder.mdb''

%26gt;

%26gt; Server.ScriptTimeout = 300

%26gt;

%26gt; %%26gt;


%26gt;

%26gt; now im using a mac, so i think i will strugle to use a
local ODBC !?

%26gt; correct!?

%26gt; when establishing a connnection in DWMX, i pressumed i
would selct DSN

%26gt; connection, name it and in the DSN box take from the
above file

%26gt;
\iis685\domains\p\premierteamsports.net\user\htdocs\sitebuilder.mdb

%26gt;

%26gt; not that simple apparently! this doesnt work!!

%26gt;

%26gt; What have i overlooked!?

%26gt; Thanks

%26gt; Dave

%26gt;





trying to migrate from php to asp.
right, thanks i see.

i have used this string:

Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\myFolder\myAccess2007file.accdb;Persist Security
Info=False;



i have tried to replace the source code such that it points
to my local copy:

Source=Macintosh HD:Users:Dave
Bursey:premierteamsports:htdocs:accessproject.mdb



that didnt work!



i have also tried the remote equivelant. Im intruiged as to
what the string in the includes file points towards!?

I have no ability to read access files on this machine (iMac)
will this be an issues?
The include file uses an implicit connection. With file-based
sources (like

text files, Excel, and Access), you can often just pass the
path, and ADO

will figure out what's going on without your intervention.
That doesn't

mean it's generally a good idea. ;)



''davebusey'' %26lt;webforumsuser@macromedia.com%26gt; wrote in
message

news:eub682$5pj$1@forums.macromedia.com...

%26gt; right, thanks i see.

%26gt; i have used this string:

%26gt; Provider=Microsoft.ACE.OLEDB.12.0;Data

%26gt; Source=C:\myFolder\myAccess2007file.accdb;Persist
Security Info=False;



Looks OK, but I've never seen that provider before. But I
know MS has been

trying to ditch JET, so that makes sense.



%26gt; i have tried to replace the source code such that it
points to my local

%26gt; copy:

%26gt; Source=Macintosh HD:Users:Dave

%26gt; Bursey:premierteamsports:htdocs:accessproject.mdb

%26gt;

%26gt; that didnt work!

%26gt; I have no ability to read access files on this machine
(iMac) will this be

%26gt; an

%26gt; issues?



I don't know if you'll be able to do this on a mac. You'd
have to track

down some mac providers for Access (they can be OLE DB or
ODBC). I'm not

sure how you'd specify the path, either. It would make sense
to do it the

same way you would anywhere else on the mac, but I don't know
if there's

something going on under the covers kind of like on old Win
95 machines.





No comments:

Post a Comment