VB.NET - vb.net connection to odbc for retrieving data from tally

Asked By silna chandra on 23-Jul-08 06:23 AM


i m new to vb.net

i need to connect my .net code to tally odbc for retrieving data .

My code snippet

Dim query As String = "SELECT Company.`$_DBName` from  my_company.company"

Dim source As String = "PORT=9000;DRIVER=Tally ODBC Driver;SERVER={(local)}"

Dim con As OdbcConnection

con = New OdbcConnection(source)


I m getting error wavy lines for OdbcConnection   what import statement am i missing

any ideas on how to resolve this ?


System.Data.Odbc - mv ark replied to silna chandra on 23-Jul-08 06:30 AM

Use the namespace System.Data.Odbc

Did you try with DSN? - Nagaraj muthuchamy replied to silna chandra on 23-Jul-08 06:32 AM

I think, you need to create a dsn for data source and try accessing the data source via dsn.

Connection string to connect the dsn follows.

Dim oODBCConnection As Odbc.OdbcConnection
Dim sConnString As String = "Dsn=myDsn;" & _
       "Uid=myUsername;" & _
oODBCConnection = New Odbc.OdbcConnection(sConnString)

Reference: http://www.codemaker.co.uk/it/tips/ado_conn.htm

only in .net 1.1 - Santhosh N replied to silna chandra on 23-Jul-08 07:00 AM

You need to use System.Data.Odbc namespace

but, it supports only in .Net 1.1 version

ya it worked - silna chandra replied to Santhosh N on 23-Jul-08 07:15 AM
thx it worked
Replay - vinod nair replied to silna chandra on 30-Jul-08 01:34 AM
imports Imports System.Data.Odbc namespace
Murali Krishnan replied to silna chandra on 03-Feb-10 11:53 PM

I saw your questions ..could u post me or mail me how to connect vb.net to tally

Krishnakumar replied to silna chandra on 07-Feb-11 05:51 AM
i am also having the same problem da punda mavaney. Find the answer and send it to me. it is not request. it is order from T.G.Krishnakumar,(Managing Director), Amain Infotech, Chennai. Pundayappa reply pannuda panni pundaya oombi...
pramod yadav replied to silna chandra on 03-May-18 09:20 AM
you should import
Import System.Data.Odbc
and then
con=new OdbcConnection("DSN=TallyODBC_9000;DRIVER=Tally ODBC Driver;SERVER={(local)}")
make sure you have DSN