How to export from Tally
-
2012년 5월 2일 수요일 오전 11:21
Hi All,
I don't whether its correct place to ask this or not...
Am trying to build a front end plugin, where i can export data from tally, am using SOAP Calls for this. but i don't know how to fetch list of all objects available in Tallly, on i get list of objects then i can export data from each object depending on users selection.
To export object we have SOAP Request but not to get list of Object..
Thanks in advance ....
모든 응답
-
2012년 5월 2일 수요일 오후 1:49
AFIK, Tally 9.0 supports ODBC connection to its database; you can try using ado.net odbc connection, Adopter and dataset to fill data from Tally 9.0 database. You can open a connection using below code snippet.
OdbcConnection con = New OdbcConnection("PORT=9000;DRIVER=Tally ODBC Driver;SERVER={(local)}"); con.Open();Otherwise, Tally will automatically create System DSN and user DSN if you add TDL code file in Tally config file/ TDL Configuration in Tally. You can use that DSN in ODBC connection.
OdbcConnection con = New OdbcConnection("Dsn=TallyODBC_9000;uid=****;pwd=****");You can follow SKracker's solutions from here.
I doubt , some one from here will help here, as Tally ODBC driver is not a micrsoft product.Try asking this on Tally's suport site.
Lingaraj Mishra
- 편집됨 Lingaraj Mishra 2012년 5월 2일 수요일 오후 1:50
- 답변으로 제안됨 Paul P Clement IVMVP 2012년 5월 3일 목요일 오후 5:24
- 답변으로 표시됨 Allen Li - AI3Microsoft Contingent Staff, Moderator 2012년 5월 7일 월요일 오전 6:30
-
2012년 5월 9일 수요일 오전 8:46
I did not get your exact question you want to import data from Tally..? or export to it..?
if you want to Export Data to Tally from ODBC Driver it's not possible...click link below why to know
ODBC Driver will not Give you all Objects unless you use TDL
But if you're using SOAP to extract data thenuse Tally XML Tags as such to get all the Data objects
//but you need to change the Advanced Tally Configuration to Serve your request..
using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.Odbc; using System.Net; using System.IO; using System.Data.SqlClient; using System.Data.SqlTypes; //using MSXML2; namespace TallyDataTest { class TallyXml { private static string RequestXML = "<ENVELOPE><HEADER><TALLYREQUEST>Export Data</TALLYREQUEST></HEADER><BODY><EXPORTDATA><REQUESTDESC><REPORTNAME>List of Accounts</REPORTNAME><STATICVARIABLES><SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT><ACCOUNTTYPE>All Inventory Masters</ACCOUNTTYPE></STATICVARIABLES></REQUESTDESC></EXPORTDATA></BODY></ENVELOPE>"; private static WebRequest TallyRequest;// = WebRequest.Create("http://192.168.0.96:9000"); //private static ServerXMLHTTP30 RequestClient=new ServerXMLHTTP30(); public static DataSet ConnectToTally() { RequestXML = "<ENVELOPE><HEADER><TALLYREQUEST>Export Data</TALLYREQUEST></HEADER><BODY><EXPORTDATA><REQUESTDESC><REPORTNAME>List of Accounts</REPORTNAME><STATICVARIABLES><SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT><ACCOUNTTYPE>All Inventory Masters</ACCOUNTTYPE></STATICVARIABLES></REQUESTDESC></EXPORTDATA></BODY></ENVELOPE>"; TallyRequest = WebRequest.Create("http://192.168.0.96:9000"); ((HttpWebRequest)TallyRequest).UserAgent = ".NET Framework Example Client"; // Set the Method property of the request to POST. TallyRequest.Method = "POST"; // Create POST data and convert it to a byte array. string postData = RequestXML; byte[] byteArray = Encoding.UTF8.GetBytes(postData); // Set the ContentType property of the WebRequest. TallyRequest.ContentType = "application/x-www-form-urlencoded"; // Set the ContentLength property of the WebRequest. TallyRequest.ContentLength = byteArray.Length; // Get the request stream. Stream dataStream = TallyRequest.GetRequestStream(); // Write the data to the request stream. dataStream.Write(byteArray, 0, byteArray.Length); // Close the Stream object. dataStream.Close(); // Get the response. WebResponse response = TallyRequest.GetResponse(); // Display the status. string Response=(((HttpWebResponse)response).StatusDescription).ToString(); // Get the stream containing content returned by the server. dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromTallyServer = reader.ReadToEnd().ToString(); // Display the content. //string ResponseFromtally=responseFromServer.ToString(); DataSet TallyResponseDataSet = new DataSet(); TallyResponseDataSet.ReadXml(new StringReader(responseFromTallyServer)); // Clean up the streams. reader.Close(); dataStream.Close(); response.Close(); byteArray = null; response = null; responseFromTallyServer = null; Response = null; dataStream = null; // RequestClient.open("Get", "http://localhost:9000/", false, null, null); // RequestClient.send( // IXMLDOMNode ResponseXml = (IXMLDOMNode)RequestClient.responseXML; return TallyResponseDataSet; } } }
Go to the following link I've explained how things work...
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/c2bb28a8-8fed-4132-9b9d-8179f18b8dee
$Kracker
- 편집됨 SKracker 2012년 5월 9일 수요일 오전 8:48 Correction
- 답변으로 표시됨 Allen Li - AI3Microsoft Contingent Staff, Moderator 2012년 5월 10일 목요일 오전 2:16

