Showing posts with label backend. Show all posts
Showing posts with label backend. Show all posts

Monday, March 19, 2012

Connection Management

Hi:

I have a Point-of-sale application that uses SQL Server2000 for the backend.
Basically, the users perform various functions boiling down to login (check
password from a table) and data entry (insert a food entry). Previously, I
would open a new ADO 2.7 connection to the database each time one of these
types of database accessing functions needed to be performed - but I noticed
that sometimes the DB would freeze the application for 20 seconds or so - or
even cause a timeout error.

To fix this, I open a DB connection when the application first starts,
keeping it open for the life of the application - each time a function needs
to access the DB, it just uses the applications (global) connection that is
constantly open and connected.

This seems to have fixed the problem, however, I am curious, is this an OK
way to handle the connections - keeping in mind that there are four separate
stations - each running the application - at the same time. Therefore, I
have 4 constantly open connections at the same time.

Thanks and regards,

Ryan Kennedy"Ryan P. Kennedy" <ryanp.kennedy@.verizon.net> wrote in message
news:lYnBb.4549$UM4.1037@.nwrdny01.gnilink.net...
> Hi:
> I have a Point-of-sale application that uses SQL Server2000 for the
backend.
> Basically, the users perform various functions boiling down to login
(check
> password from a table) and data entry (insert a food entry). Previously,
I
> would open a new ADO 2.7 connection to the database each time one of these
> types of database accessing functions needed to be performed - but I
noticed
> that sometimes the DB would freeze the application for 20 seconds or so -
or
> even cause a timeout error.
> To fix this, I open a DB connection when the application first starts,
> keeping it open for the life of the application - each time a function
needs
> to access the DB, it just uses the applications (global) connection that
is
> constantly open and connected.
> This seems to have fixed the problem, however, I am curious, is this an OK
> way to handle the connections - keeping in mind that there are four
separate
> stations - each running the application - at the same time. Therefore, I
> have 4 constantly open connections at the same time.
>
> Thanks and regards,
> Ryan Kennedy

I don't know much about ADO, but it sounds like you're describing a form of
connection pooling, which is certainly a very common way to manage
connections from multiple clients.

Simon|||"Ryan P. Kennedy" <ryanp.kennedy@.verizon.net> wrote in message
news:lYnBb.4549$UM4.1037@.nwrdny01.gnilink.net...
> Hi:
> I have a Point-of-sale application that uses SQL Server2000 for the
backend.
> Basically, the users perform various functions boiling down to login
(check
> password from a table) and data entry (insert a food entry). Previously,
I
> would open a new ADO 2.7 connection to the database each time one of these
> types of database accessing functions needed to be performed - but I
noticed
> that sometimes the DB would freeze the application for 20 seconds or so -
or
> even cause a timeout error.
> To fix this, I open a DB connection when the application first starts,
> keeping it open for the life of the application - each time a function
needs
> to access the DB, it just uses the applications (global) connection that
is
> constantly open and connected.
> This seems to have fixed the problem, however, I am curious, is this an OK
> way to handle the connections - keeping in mind that there are four
separate
> stations - each running the application - at the same time. Therefore, I
> have 4 constantly open connections at the same time.

Connection pooling, the sharing of a single connection among components of
an application, is very common and a good design principle. It is
particularly great for web based/ASP applications, in order to conserve
resource. Persistant connections, keeping a connection open even when not in
use, is something I shy away from in my client server and my web based app
designs. I prefer to create a connection, pool it, and then open and close
it as needed.

It sounds like you are looking for a solution to a symptom, and not your
problem. If I were you, I would investigate the reason your app is timing
out and solve that.

--
BV.
WebPorgmaster - www.IHeartMyPond.com
Work at Home, Save the Environment - www.amothersdream.com

Sunday, February 19, 2012

connection an access db to sql express backend

can someone advise me as to what i have to do to connect an access frontend to an sql server express backend db on another server.

can i somehow link the tables so a user can enter in data in the access db they are familiar with but it will actually go into sql server.

please help

Hi,

you can either click right in the tables area and add a linked table using an ODBC connection or use a ADP project which can directly access the objects of a SQL Server database. But it is important that you enable remote connections on the SQL Server side using the Surface configuration. See the screencast on my side for more information.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Friday, February 17, 2012

Connecting WinCE app directly to SQL Server

We are developing a portable gaming device for use in casinos and bingo
halls. We use SQL Server (2000K) as the backend. The gaming device
software is a Windows CE application written in C/C++. We do not use any
framework as we needed maximum graphics speed to spin reels and do other
animations so that rules out the usual way to connect CE to SQL Server. We
currently use a product called CEFusion that provides us with an ADO
interface to SQL server but it is overkill for what we need and has a high
per client cost.
We are thinking about writing our own SQL client software, and have
sufficient programming skills to do it, but we don't know if that is
something Microsoft allows or if they would release the information needed
to do it. Is this possible? Are there any other solutions?
Hi
ADOCE is you option. No matter what, you need to use some form of OLE
DB/ODBC layer, as MS does not publish the wire protocol spec for TDS.
Look at:
http://msdn.microsoft.com/library/de.../ppc_eplus.asp
http://search.microsoft.com/search/r...=4&s=1&swc= 4
Regards
Mike
"Harold Rappold" wrote:

> We are developing a portable gaming device for use in casinos and bingo
> halls. We use SQL Server (2000K) as the backend. The gaming device
> software is a Windows CE application written in C/C++. We do not use any
> framework as we needed maximum graphics speed to spin reels and do other
> animations so that rules out the usual way to connect CE to SQL Server. We
> currently use a product called CEFusion that provides us with an ADO
> interface to SQL server but it is overkill for what we need and has a high
> per client cost.
> We are thinking about writing our own SQL client software, and have
> sufficient programming skills to do it, but we don't know if that is
> something Microsoft allows or if they would release the information needed
> to do it. Is this possible? Are there any other solutions?
>
>

Tuesday, February 14, 2012

Connecting to SQLServer 2000 (sqlsrv32.dll)

Hello,

I am having problem with our network. We run a clinic database system that uses SQLServer 2000 Enterprise as the backend, and Microsoft Access on the front end.

I have had a running problem with all our newer machines (which run Windows 2000 or XP) in that while it connects to the server and retrieves some of the info properly, on some of the pages it doesnt. It will take 2 or 3 minutes for a page of the database to load, and even then not all the information will be retrieved properly.

I was able to fix the problem on the Windows 2000 machines by replacing the Sqlsrv32.dll file with an older version (usually with 3.70.06.23). And then the W2000 machines would work. But for some reason, the XP machines wont accept the older sqlsrv32.dll file...it gives me this error:
SQLState: 'HY000'
SQL Server Error: 126 Unable to load communication module driver correctly.

...and i cant seem to downgrade the MDAC...

any ideas on what I can do?

thanksYou didnt test it properly before it was rolled out for XP, did you?

Tut tut....

Best check technet & see if there is a work around. Failing that, best roll XP boxes back to W2000. Quick, easy & saves face....then I'd spend a LOT of time ironing out the XP issue BEFORE it goes near the client again.

HTH,

Cheers,|||no they are the new computers we got in...they come with XP loaded on them already...

i'll check technet...and then possibly put W2K on them...

thanks...

Friday, February 10, 2012

Connecting to SQL Server Express 2005 using VB.NET 2005 fails

Dear Sir,

We are using VB.NET 2005 (Winform) and the backend SQL Server Express 2005. We would like to connect the Express (.mdf) database from Remote Machine. What type of connection string we have to use?

We tried the following ConnectionString but we got the error:
Provider=SQLNCLI.1;Server=.\SQLEXPRESS;AttachDbFileName=S:\MLJData.mdf;Database=MLJData;Trusted_Connection=Yes;

Also suggest what are all the prerequisites to run sql server express 2005 database in client machine.

We did installed the following tools in client machine:

1. .NET framework 2.0
2. sqlncli.msi (SQL Server Native Client Setup)

Please provide us the solution for this.

Thanks
M. Gopalan
Sofist India

okugops@.hotmail.com

hi,

databases have to be "local" to the computer running the SQL Server instance they have to be attached to.. both for security and performance issues...

regards

|||You have "Server=.\SQLEXPRESS". In this case, it will connect to local instance (i.e. local instance on the remote machine). You should specify the name of the remote server. Also make sure SQL Browser is running. And be careful about firewall.|||

Hi,

refer www.connectionstrings.com for more on connection string.

Hemantgiri S. Goswami

Connecting to SQL Server Express 2005 using VB.NET 2005 fails

Dear Sir,

We are using VB.NET 2005 (Winform) and the backend SQL Server Express 2005. We would like to connect the Express (.mdf) database from Remote Machine. What type of connection string we have to use?

We tried the following ConnectionString but we got the error:
Provider=SQLNCLI.1;Server=.\SQLEXPRESS;AttachDbFileName=S:\MLJData.mdf;Database=MLJData;Trusted_Connection=Yes;

Also suggest what are all the prerequisites to run sql server express 2005 database in client machine.

We did installed the following tools in client machine:

1. .NET framework 2.0
2. sqlncli.msi (SQL Server Native Client Setup)

Please provide us the solution for this.

Thanks
M. Gopalan
Sofist India

okugops@.hotmail.com

hi,

databases have to be "local" to the computer running the SQL Server instance they have to be attached to.. both for security and performance issues...

regards

|||You have "Server=.\SQLEXPRESS". In this case, it will connect to local instance (i.e. local instance on the remote machine). You should specify the name of the remote server. Also make sure SQL Browser is running. And be careful about firewall.|||

Hi,

refer www.connectionstrings.com for more on connection string.

Hemantgiri S. Goswami