Thank you... / will try & feedback ..

:)

On Thursday, November 14, 2013 5:14:12 AM UTC+7, Derek wrote:
>
> Possible...
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
> [Microsoft][ODBC Driver Manager]Data source name not found and no default 
> driver specified. 
> This usually happens in one of the following scenarios:
>    
>    - you referenced your connection incorrectly (e.g. spelled the DSN 
>    name, or one of the DSN-less string components wrong);
>    - you referenced a DSN that doesn't exist;
>    - the user connecting to the DSN or DSN-less connection doesn't have 
>    access to the information stored in the registry (see KB 
> #306345<http://support.microsoft.com/default.aspx/kb/306345>
>    );
>    - you used an English or localized driver detail for your connection 
>    string when your system is not set up in that language (see KB 
> #174655<http://support.microsoft.com/default.aspx/kb/174655>); 
>    or,
>    - you are missing the connection string entirely (this can happen if 
>    you maintain your connection string in a session variable, and your 
>    sessions aren't working; see Article 
> #2157<http://www.aspfaq.com/show.asp?id=2157>
>    ).
>
> http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html
>
> On Tuesday, November 12, 2013 9:03:05 PM UTC-7, Cacpacific O wrote:
>>
>> Hello Tim,
>>
>> Thank you for sharing.
>> I've try as your advice but it still return error message as follow, Is 
>> it possible that there is something wrong with my odbc setup.
>>
>> :)
>>
>> db = DAL('mssql://UserName:passw...@203.xxx.xx.xxx\SQLExpress/myDatabase', 
>> lazy_tables=True, pool_size=10)
>>
>> RuntimeError: Failure to connect, tried 5 times:
>>
>> Traceback (most recent call last):
>>
>>  File "/home/www-data/web2py/gluon/dal.py", line 7562, in __init__
>>
>>    self._adapter = ADAPTERS[self._dbname](**kwargs)
>>
>>  File "/home/www-data/web2py/gluon/dal.py", line 3279, in __init__
>>
>>    if do_connect: self.reconnect()
>>
>>  File "/home/www-data/web2py/gluon/dal.py", line 627, in reconnect
>>
>>    self.connection = f()
>>
>>  File "/home/www-data/web2py/gluon/dal.py", line 3277, in connector
>>
>>    return self.driver.connect(cnxn,**driver_args)
>>
>> Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not 
>> found, and no default driver specified (0) (SQLDriverConnect)')
>>
>>
>>
>>
>> On Wednesday, November 13, 2013 5:27:55 AM UTC+7, Tim Richardson wrote:
>>>
>>> Here is a working example using server authentication on a server called 
>>> win2003, with a sqlserver instance name hcnsql07 and connecting to a 
>>> database called hcn using default ports
>>>
>>> (I've added a couple of other parameters for performance.
>>>  Investigate lazy_tables, it makes a huge difference. )
>>>
>>>
>>> db_ps_1TE = DAL('mssql://tim:password@win2003\hcnsql07/hcn', 
>>> lazy_tables=True, pool_size=10)
>>>
>>> On Monday, 11 November 2013 07:10:43 UTC+11, Ariya Owam-aram wrote:
>>>>
>>>> Dear all,
>>>>
>>>> I have to connect mssql database which is locate on  another server by 
>>>> using pyodbc.
>>>>
>>>> It working if connect by using 
>>>>
>>>> pyodbc.connect(DNS=dns;UID=user_name;PWD=password)
>>>>> <pyodbc.Connection at 0x391bdc0>
>>>>>
>>>>
>>>> But I can't connect with  DAL()
>>>>
>>>> db = 
>>>>> DAL("mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase")
>>>>
>>>>
>>>> return error as follow
>>>>
>>>>> Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name 
>>>>> not found, and no default driver specified (0) (SQLDriverConnect)')
>>>>
>>>>
>>>> As searching from web2py google group, I also try:
>>>>
>>>> db = 
>>>>> DAL("mssql://userName:passw...@203.xxx.xx.xxx\SQLExpress,1433/myDatabase?Driver={FreeTDS}")
>>>>
>>>>
>>>> return error as follow
>>>>
>>>> Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to 
>>>> connect to data source (0) (SQLDriverConnect)')
>>>>
>>>> ---------------------------
>>>> in my /etc/odbc.ini
>>>>
>>>> [TS]
>>>>> Description="ODBC Connection via FreeTDS"
>>>>> Driver=FreeTDS
>>>>> Server=203.xxx.xx.xxx
>>>>> port=1433
>>>>> Database=myDatabase
>>>>
>>>> ---------------------------
>>>> in my /etc/odbcinst.ini
>>>>
>>>>> [FreeTDS]
>>>>> Description=FreeTDS
>>>>> Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
>>>>> Setup=/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
>>>>
>>>> ---------------------------
>>>> in my /etc/freetds/freetds.conf
>>>>
>>>> ### Did not change anything ###
>>>>
>>>> ---------------------------
>>>> in my /etc/freetds/tds.driver.template  
>>>>
>>>>> [TDS]
>>>>> Description     = FreeTDS Driver for Linux & MSSQL on Win32
>>>>> Driver          = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
>>>>> Setup           = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
>>>>
>>>> ---------------------------
>>>> in my /etc/freetds/tds.dsn.template
>>>>
>>>> [DSN_NAME]
>>>>
>>>>> Description     = Descripton of you DSN connection.
>>>>> Driver          = TDS
>>>>> Trace           = No
>>>>> Database        = myDatabase
>>>>> Server          = 203.xxx.xx.xxx
>>>>> Port            = 1433
>>>>> TDS_Version     = 8.0
>>>>
>>>>
>>>>
>>>>
>>>> Thank you very much
>>>> Ariya
>>>>
>>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to