Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,


I have some coding to connect it into tally odbcdriver.But I am getting an error while connecting into tally.Please clear it.


private void Form1_Load(object sender, EventArgs e)
       {
           string query = "SELECT Company.`$_DBName`, Company.`$_ThisYearBeg`, Company.`$_ThisYearEnd`, Company.`$_PrevYearBeg`, Company.`$_PrevYearEnd`, Company.`$_ThisQuarterBeg`, Company.`$_ThisQuarterEnd`, Company.`$_PrevQuarterBeg`, Company.`$_PrevQuarterEnd`, Company.`$_Name`, Company.`$_Address1`, Company.`$_Address2`, Company.`$_Address3`, Company.`$_Address4`, Company.`$_Address5` FROM Techweb.TallyUser.Company Company ORDER BY Company.`$_DBName`";
           string source = "Dsn=tally;uid=sa;password=sa;app=Microsoft® Visual Studio® 2008;wsid=SLNN-207";
           OdbcConnection con = new OdbcConnection(source);
           OdbcCommand cmd = new OdbcCommand(query, con);
           con.Open();---->In this line i am getting error.


           //ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Cannot open

          database '(unknown)'.  It may not be a database that your application
          recognizes, or the file may be corrupt.//

          //ERROR [01S00] [Microsoft][ODBC Microsoft Access Driver]Invalid
         connection string attribute password //


           OdbcDataAdapter da = new OdbcDataAdapter(query, con);
           DataTable dt = new DataTable("table1");
           da.Fill(dt);
           dataGridView1.DataSource = dt;
           dataGridView1.DataMember = "table1";
           con.Close();
       }
Posted

1 solution

AFAIK there is no ODBC Tally driver: so access like that will not work. You can use RTSLink: www.rtslink.com[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900