It is difficult to understand what problem you are having, but maybe this is 
the problem:

Have you set up the ODBC driver in windows itself?  that is required.  Using 
windows, you'd go to control panel, then administrative Tools, then Data 
Sources (ODBC) and from there you'd have to create a System DSN with a specific 
name that you refer to in your .afl code.  I see you are doing some of that 
here below, but you need to get it set up right in Windows first.  

If you have a passwording problem as you mention in the 2nd paragraph, then I'm 
sorry but I don't know the password :-)

Also, I notice DSN=mySQL in the 3rd line below and yet you said you created a 
user dsn dbtorontotrader.  These are different names and they have to be the 
same.

I hope these 3 ideas help you.


  ----- Original Message ----- 
  From: murthysuresh 
  To: [email protected] 
  Sent: Monday, June 30, 2008 11:22 AM
  Subject: [amibroker] afl and odbc database issues


  hello
  i am trying to connect to my databse in mysql from afl and i get an 
  error that i dont know how to fix.
  odbcOpenDatabase("ODBC;DATABASE=dbtrader;DSN=mySQL 
  dbtrader;OPTION=0;PORT=0;UID=root"); 
  odbcGetArraySQL("SELECT * from rawdatas");

  odbcGetLastError() ;

  i have a user dsn setup for dbtorontotrader. however it has a password 
  and i dont know how to change it in the example opendatabase option 
  that TJ has provided.
  i get error Data source name not found and no default driver specified
  both are there on my machine. 
  how do i fix this issue.



   

Reply via email to