help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] MS Access 64 bit


From: glpk xypron
Subject: Re: [Help-glpk] MS Access 64 bit
Date: Mon, 10 Oct 2011 20:25:34 +0200

Hello Alex,

if 100 characters is too short for the DSN you can use a file DSN.

I created the following files.

C:\Temp\path with spaces\sudoku_access.dsn'
-------------------------------------------
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
DBQ=C:\Temp\path with spaces\glpk.mdb


C:\temp\test.mod
----------------
...
table ti IN 'ODBC'
  'FileDSN=C:\Temp\path with spaces\sudoku_access.dsn'
  'SELECT * FROM sudoku'
  'WHERE ID = ' & id :
  fields <- [COL, LIN], givens ~ VAL;
...
table ta {(i, j) in {i1 in 1..9} cross {i2 in 1..9}} OUT 'ODBC'
  'FileDSN=C:\Temp\path with spaces\sudoku_access.dsn'
  'DELETE FROM sudoku_solution'
  'WHERE ID = ' & id & ';'
  'INSERT INTO sudoku_solution'
  '(ID, COL, LIN, VAL)'
  'VALUES(?, ?, ?, ?);' :
  id ~ ID, i ~ COL, j ~ LIN, (sum{k in 1..9} x[i,j,k] * k) ~ VAL;
...


I issued the following command.
C:\Temp> "c:\Program Files\GLPK\glpk-4.47\w32\glpsol.exe" -m test.mod

And everything ran smoothly.

...
Reading ti...
Connected to ACCESS 04.00.0000 - C:\Temp\path with spaces\glpk
SELECT * FROM sudoku WHERE ID = 1
Generating fa...
Generating fb...
...
Writing ta...
Connected to ACCESS 04.00.0000 - C:\Temp\path with spaces\glpk
DELETE FROM sudoku_solution WHERE ID = 1
INSERT INTO sudoku_solution (ID, COL, LIN, VAL) VALUES(?, ?, ?, ?)
...

C:\Temp>

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Mon, 10 Oct 2011 23:17:52 +1100


> Betreff: Re: [Help-glpk] MS Access 64 bit

> Hello again,
> 
> Hopefully this will be the last time on the same topic.
> 
> My desire to use the DSN is also driven by the maximum connection string
> using DSN-less.  As I understand it, the 'DRIVER={Microsoft Access
> Driver (*.mdb)};dbq=glpk.mdb' cannot be split over multiple lines, so if
> the path to the .mdb is lengthy the connection will fail.  I have tried
> to split the connection string but received similar failure.
> 
> If there is a way to split the DSN-less connection it would be very
> useful, please.
> 
> Regards, Alex 
> 
> > _____________________________________________ 
> > From:       Alex Morelli  
> > Sent:       Monday, 10 October 2011 7:58 PM
> > To: 'address@hidden'
> > Subject:    RE: MS Access 64 bit
> > 
> > Hello again,
> > 
> > My apologies - I was in error regarding the DSN-less syntax including
> > spaces.  It was my error for not specifying the path correctly.
> > Spaces are allowed.
> > 
> > If you wish the following is preferred for my original question (I
> > have removed the DSN-less space comments).
> > 
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > +++++++++++++++
> > 
> > I would appreciate any advice for enabling the DSN connection to MS
> > Access 64-bit.
> > 
> > I am using:
> > 
> > Microsoft Windows 7 Professional SP1 64-bit
> > Microsoft Office Professional 2010 64-bit
> > 
> > I have setup the user DSN ODBC connections using the
> > %windir%\system32\odbcad32.exe.
> > 
> > The Microsoft Access driver selected is - "Microsoft Access Driver
> > (*.mdb, *accdb)" with Version = 14.00.6015.1000, file = ACEOBDC.DLL,
> > date = 21/12/2010.
> > 
> > For each DSN the user / password is glpk/gnu (as per previous
> > examples).
> > 
> > I am also using GUSEK.  I have copied the following files from
> > glpk-4.47/w64 to the gusek folder (which contains gusek.exe)
> > 
> >     glpsol.exe              11/09/2011 at 2:26am    75,264 bytes
> >     glpk_4_47.dll           11/09/2011 at 2:26am    1,498,624 bytes
> >     glpk_4_47_java.dll      11/09/2011 at 2:26am    392,192 bytes
> > 
> > When I run my model the first DSN call generates the following error:
> > 
> > "IM014:1:0:[Microsoft][ODBC Driver Manager] The specified DSN contains
> > an architecture mismatch between the Driver and the Application ....."
> > 
> > When I replace this with connection with:
> > 
> > 'DRIVER={Microsoft Access Driver (*.mdb)};dbq=glpk.mdb'
> > 
> > the connection works properly.
> > 
> > For simplicity, I would prefer to continue with the DSN connections.
> > 
> > I am baffled because the DSN-less connection works?
> > 
> > Assistance with this problem would be appreciated.
> > 
> > Regards, Alex 
> > 
> > 
> > 
> > Regards, Alex 
> > _________ 
> > Alex Morelli 
> > Bldg 6, 650 Church Street, Richmond VIC 3121
> > Mobile +61 400 365 754 / address@hidden
> > 
> > 
> > 
> > _____________________________________________ 
> > From:       Alex Morelli  
> > Sent:       Monday, 10 October 2011 7:17 PM
> > To: address@hidden
> > Subject:    MS Access 64 bit
> > 
> > Hello,
> > 
> > I would appreciate any advice for enabling the DSN connection to MS
> > Access 64-bit.
> > 
> > I am using:
> > 
> > Microsoft Windows 7 Professional SP1 64-bit
> > Microsoft Office Professional 2010 64-bit
> > 
> > I have setup the user DSN ODBC connections using the
> > %windir%\system32\odbcad32.exe.
> > 
> > The Microsoft Access driver selected is - "Microsoft Access Driver
> > (*.mdb, *accdb)" with Version = 14.00.6015.1000, file = ACEOBDC.DLL,
> > date = 21/12/2010.
> > 
> > For each DSN the user / password is glpk/gnu (as per previous
> > examples).
> > 
> > I am also using GUSEK.  I have copied the following files from
> > glpk-4.47/w64 to the gusek folder (which contains gusek.exe)
> > 
> >     glpsol.exe              11/09/2011 at 2:26am    75,264 bytes
> >     glpk_4_47.dll           11/09/2011 at 2:26am    1,498,624 bytes
> >     glpk_4_47_java.dll      11/09/2011 at 2:26am    392,192 bytes
> > 
> > When I run my model the first DSN call generates the following error:
> > 
> > "IM014:1:0:[Microsoft][ODBC Driver Manager] The specified DSN contains
> > an architecture mismatch between the Driver and the Application ....."
> > 
> > When I replace this with connection with:
> > 
> > 'DRIVER={Microsoft Access Driver (*.mdb)};dbq=glpk.mdb'
> > 
> > the connection works properly.
> > 
> > For simplicity, I would prefer to continue with the DSN connections.
> > One reason is that I have linked tables between various mdb files and
> > worse than that the folder names include spaces (which makes the DSN
> > less connection fail in the connection string - I can't work out how
> > to represent the path including the space in the folder name - I have
> > tried enclosing in "", '', [] to no avail).
> > 
> > I am baffled because the DSN-less connection works (except for those
> > folder names with spaces)?
> > 
> > Assistance with either / both of the DSN problem or how to specify
> > DSN-less path including spaces would be appreciated.
> > 
> > Regards, Alex 
> > 

-- 
Follow me at http://twitter.com/#!/xypron

NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

[Prev in Thread] Current Thread [Next in Thread]