I want to make an application to sync Tally Sales Order and Sales Invoice from tally to our SQL Database. Currently for testing purpose I am using Tally ERP 9 Educational Version.
I have created some sales orders in tally and need all order with their details from tally using tally ODBC Sql query
uptil as per my research, I am getting few sales order details like Voucher Number,Order Date,'Voucher Type'.. etc. from tally ODBC table CompanyVoucher. but few details came empty, although related data exist in tally order. like Reference , Party Name ... etc.
Also, I am unable to find Tally ODBC table to get few other sales order related data like item name, item number , item quantity, rate and order total, order no etc.
Can anybody suggest SQL Query or Tally ODBC Table from where i can find these order related data. Also I am not sure, if we can not access these details due to Educational Version, and any limitations on Educational Version on access of these details.
so please suggest me on this.
Synchronisation is the process of replicating data between two or more computers using Tally.ERP 9 in a Client – Server environment. Data is transferred from the client to the server and vice versa. Tally.ERP 9 offers control over the frequency of Synchronisation i.e., data can be replicated after each transaction or updated at specific intervals.
Configure Server for Synchronization
To configure the Server Company for Synchronization, follow the steps given below:
Go to Gateway of Tally > F12: Configure > Advanced Configuration
In the Advanced Configuration screen,
Under Client/Server Configuration section,
Set the option Tally is acting as to Server, to run Tally.ERP 9 as Sync Server
Specify the required port number (e.g. 9009) in the Port field....
Tab down to Tally Sync Configuration section:
Set the option Ignore Clients modified Voucher Type Masters to No, so that modifications made to Voucher Type Masters on the Client are updated on the Server
Set the option Enable Sync Logging to Yes, to generate a Log file which contains synchronized vouchers and is saved in the Tally folder.
Set the option Truncate previous log before Syncing should be set to Yes, to allow the previous log file to be overwritten by the current log file.
Go to end and press Enter to save the details.
For the above changes to take effect, Tally.ERP 9 will prompt you to restart the application as shown:
Press Enter or select Yes to restart Tally.ERP 9 on the Server computer.
Tally.ERP 9 will restart and in the Information Panel you can see that it is configured as the Sync Server as shown below.
Detailed reference here.
If the datas are present and you cannot access the sync then there
must be restriction in your version
Related
IDE: Visual Studio, C# .net 4.0, Winforms application
Is there any way in SQL Server to implement a column in a table which can set itself automatically to 0 when it has not received any ACK (acknowledgement) signal from the application side?
The requirement is I want to keep a column which can keep track that Is application is open or it has been closed?
One way to implement is using the OnClose() event, i.e. on Close() I can change it's value to 0. but the problem is suppose application got hanged for some reason or Power is gone than the value in database will not be updated to zero.
So I want to create an automated column which can track this situation and make itself zero when the application is not sending any request or idle means closed.
please suggest how to handle this.
You can't do that. The only thing you can do is to save GETDATE() in a column in a table as the last activity time of the application and invoke the stored procedure from a high-priority thread every 10 seconds for example.
When you want to know if the application is alive or not, just check this value, if more than 10 seconds is passed since then, you app is gone.
UPDATE:
A more precise but complex approach would be to listen on a socket inside your application and then whenever you want to know if the application is alive, send a request from your sql script to PING the application. You should use CLR programming for this approach, but I think the first one will be practically enough.
Considering it will be a multiple instance scenario where multiple instances of the application can point to same database. You can try the following:
Create a separate table to maintain sessions. This table would contain three columns 1)Machine name or IP 2) Session Id (GUID) and 3) TimeStamp.
Whenever application starts create a new session id and make an entry into this table it means new session is started.
Keep on updating timestamp on every request based on session id.
Have a timeout configured somewhere in web.config or database which will come in handy later.
Now when application is exiting gracefully then delete the row from the table.
Now if application crashes the row won't be delete so next time when application starts you can check if the row already exists. Use machine name or IP to query to the table.
Use the timeout setting configured in (3) above to determine since how long the application is idle.
I am creating a web application that allows the user to choose and save which database he/she wants to connect to in order to set that as the database that contains users information.
STEP 1: Create database connection setting with a) database engine, b) host, c) port, d) username, e) password
STEP 2: Choose this database setting as being the one that will be used in order to connect ot the database to view user information
STEP 3: View sets of users based on filters and rules
My question is what is the secure way to store dynamically created "connection strings?"
*NOTE: I don't want to have hard-coded connection strings in a config file because I want the users to be able to configure their own at run-time and then use them without having to have an admin mess with updating files on the server.
**NOTE AGAIN: I also want a user to be able to use different connection strings at different times while using the web application. First they may want to use the connection to DB1 but then 5 minutes later they may need to use the connection to DB2.
I have a desktop C# application, several clients are connected into SQL server. Each user has an ID and Password. what do i want is to prevent an already logged-in user to log-in from another computer.
I have implemented it by updating a Field in the database 'UserLoggedIn'=true at the login, and when the user logs out the Field Updated into False. But this solution is not optimal, in which if the system crashed or the computer shutdown unexpectedly, the value will stay 'UserLoggedIn'=True in the database and this user will never can log-in again to the system.
What is the optimal solution for that, and prevent an already logged-in user from logging-in from another computer?
Instead of true, store a timestamp in the database. Make sure that you update it periodically while the user is logged in.
When they log in, allow them if it's not too new. That is: if you've seen them from another PC within the last (say) 30 seconds, then consider that session still live, and reject the new login.
This way, if their other PC crashes, the timestamp will not be updated, and will eventually expire.
The update frequency should be about twice the expiry timeout. For example, if you want a session expiry of 1 minute, you should update the timestamp every 30 seconds.
I would suggest that you check if the user has already established a connection to the database using the following query
SELECT loginame as LoginName,program_name
FROM sys.sysprocesses
WHERE db_name(dbid)='my_database' and loginame='test_user'
If the number of records returned is greater than zero then you can assume that a user has already connected to the database from your application.
If you look at the connection string property in MSDN, you will find the following properties of interest. These 2 properties can be added to your existing connection string to further improve the filters that can be defined in the query above
Application Name - The name of the application, or '.Net SqlClient Data Provider' if no application name is provided. (=program_name in the table above)
Workstation ID - The name of the workstation connecting to SQL Server. (=hostname in the table above )
I believe that this solution will work irrespective of crashes on the client side and does not require that you save the state in any table.
I created a windows forms application in C #, and a database MS SQL server 2008 Express, and I use LINQ-to-SQL query to insert and edit data.
The database is housed on a server with Windows Server 2008 R2 (standard edition). Right now I have the application running on five different computers, and users are authenticated through active directory.
One complaint reported to me was that sometimes when different data is entered and submitted, the same data do not appear in the listing that contains the application. I use try catch block to send the errors but errors do not appear in the application; but the data simply disappear.
The id of the table records is an integer auto-increment. As I have to tell them the registration number that was entered I use the following piece of code:
try{
ConectionDataContext db = new ConectionDataContext();
Table_Registers tr = new Table_Registers();
tr.Name=textbox1.text;
tr.sector=textbox2.text;
db.Table_Registers.InsertOnSubmit(tr);
db.SubmitChanges();
int numberRegister=tr.NumberRegister;
MessageBox.Show(tr.ToString());
}
catch{Exception e}
I wonder if I'm doing something wrong or if you know of any article on the web that speaks how to insert data from different clients in MSSQL Server databases, please let me know.
Thanks.
That's what a database server DOES: "insert data simultaneously from different clients".
One thing you can do is to consider "transactions":
http://www.sqlteam.com/article/introduction-to-transactions
Another thing you can (and should!) do is to insure as much work as possible is done on the server, by using "stored procedures":
http://www.sql-server-performance.com/2003/stored-procedures-basics/
You should also check the SQL Server error logs, especially for potential deadlocks. You can see these in your SSMS GUI, or in the "logs" directory under your SQL Server installation.
But the FIRST thing you need to do is to determine exactly what's going on. Since you've only got MSSQL Express (which is not a good choice for production use!), perhaps the easiest approach is to create a "log" table: insert an entry in your "log" every time you insert a row in the real table, and see if stuff is "missing" (i.e. you have more entires in the log table than the data table).
Our C# application needs to connect to SQL 2005 and 2008 databases and check what the current status of database mirroring is (eg. is it enabled, suspended, paused, disconnected etc). Are there properties where I can check this?
All our databases that are being mirrored have no witness and manual failover (synchronous mirroring).
Much appreciated if anyone can help out or point me to some documentation, google searches are not turning up much on this.
Current state is shown in sys.database_mirroring:
SELECT mirroring_state
FROM sys.database_mirroring
WHERE database_id = DB_ID('...');
The MSDN Article here describes all the System Stored procedures that will give you the information you need
You can also retrieve or update the
current status by running the
sp_dbmmonitorresults system stored
procedure.
One non-obvious difference between using the sp_dbmmonitorresults and using sys.database_mirroring table that's in Remus's answer is the permissions required
Rights needed for sys.database_mirroring
According to the MSDN article Remus referenced
To see the row for a database other
than master or tempdb, you must either
be the database owner or have at least
ALTER ANY DATABASE or VIEW ANY
DATABASE server-level permission or
CREATE DATABASE permission in the
master database. To see non-NULL
values on a mirror database, you must
be a member of the sysadmin fixed
server role
Rights needed for sp_dbmmonitorresults
According to the previous mentioned MSDN article on mirroring SP's
members of the sysadmin fixed server
role, and users who have been added to
the dbm_monitor fixed database role