Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String for C# or JAVA

Status
Not open for further replies.

DAVIDA83

Technical User
Aug 7, 2008
5
0
0
US
Hi I'm new in tek-tips, at my company we are trying to create a website that will give access to our customers to inquiry about the orders that they have placed. right now we got it to work by pulling the information using VI and recreating the database on a webserver. but I wanted to try and see how much will the performance of the pulling of the data increase if I write an application that will pull the data and feed it directly on to the webserver database using c# or java instead of the painfully slow VI.
 
instead of the painfully slow VI."

VI! Oh I feel your pain brother. Even Sage will tell you that VI is the LEAST efficient of pulling data from MAS. I like to us Access and SQL Specific Pass Through Queries.

What is your webserver database? SQL? My suggestion is to join Sage Talk through the Sage web page and make a post. Let everyone know what type of database you have and someone should be able to tell you how to connect and pull.
 
Thanks for the advice biglouie however, I kept playing around back and forth testing my luck and I was able to connect using c#, for the database right now for our internal testing we were using sql server, but I will talk with my peers and discuss whether we go for mysql or stay in sql using c#.
FYI my connection string for C# looks like this:

connection1.ConnectionString = "DSN=SOTAMAS90;UID=uid|ABC;PWD=passw;SERVER=NotTheServer";

so far I only pulling info directly from the tables directly and the response time is then times better than VI, where I was pulling Invoice history headers it would usually take about 5 minutes to complete the task with VI, with c# it took 20 seconds. Big Difference!
 
You would find the same thing in Access. Generally VI is slower by a factor of 10 compared to just about any other method. You about have it now. Good luck on your project.
 
So you are recreating this website instead of using the EBM module that does the same thing?

Dawn
 
Did it ever occur to you Dawn that some people actually like to re-invent the wheel, har har har...
 
no, we are not trying to reinvent the wheel, although that might be fun, we are aware of the fact that the ebm module offers that funcionality but that is not the only thing we will offer in our website, we added some extra funcionality for our industry and when we sent RFPs for buying and implementing the EBM module and trying to customize it in the way we needed it, the prices were way out of budget for us.
 
I don't know what "extra functionality" you were looking at so I can't comment.

Dawn
 
For those of you who are trying to create a link from a .NET application to Sage. Here's how I did it:

Dim con As New Odbc.OdbcConnection("Driver={Sage Line 50 v14};DIR=D:\SAGEDatabase\COMPANY.003\ACCDATA;UseDataPath=No;UID=manager;PWD=mypassword")

Dim cmd As Odbc.OdbcCommand = con.CreateCommand

cmd.CommandText = "SELECT ACCOUNT_REF FROM SALES_LEDGER WHERE ACCOUNT_REF LIKE 'SA%'"

Try
con.Open()
lbl.Text = cmd.ExecuteScalar
Catch ex As Exception
lbl.Text = ex.Message
Exit Sub
Finally
con.Close()
End Try
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top