问题描述
海,
我有一个tally版本8.1.我正在做一个将理货文件转换为csv格式的项目.我想将该理货数据库连接到我的.net应用程序中.我在google中搜索.Rtslink dll是用于导出理货文件的工具.我们将应用程序连接到tally数据库中,就像我们连接到sql.我使用odbc驱动程序尝试过,但是它无法连接到tally中.Rtslink是一个支付dll.进入理货数据库.但是它无法连接.请帮助我.这对我来说是非常迫切的要求.
Hai,
I have a tally version 8.1 . I am doing a project of converting tally files into csv format.I want to connect that tally database into my .net application.I searched in google.Rtslink dll is a tool for exporting tally files.But at the same time I want to connect our application into tally database like we are connecting to sql.I tried by using odbc driver.But it can''t connect into tally.Rtslink is a payment dll.So only I am asking.Below is a code I am tried to connect into tally database.But it can''t connect.Plz help me.It is very urgent requirement for me.
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 = "PORT=9000;DRIVER=Tally ODBC Driver;SERVER={(local)}";
OdbcConnection con = new OdbcConnection(source);
OdbcCommand cmd = new OdbcCommand(query,con);
con.Open();
OdbcDataAdapter da = new OdbcDataAdapter(query,con);
DataSet ds = new DataSet();
da.Fill(ds);
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
con.Close();
推荐答案
这篇关于提示数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!