Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Sunday, February 19, 2012

connection based temp tables

Hello

I am developing a web based webshop with a ms sql back end, but I
cannot figure out how to do connection based temp tables, so that each
user gets their own temp table to hold the purchased items.

any ideas or hints would bery much appreciated

rgds

Matt<matt@.fruitsalad.org> wrote in message
news:1126360634.762880.315890@.g43g2000cwa.googlegr oups.com...
> Hello
> I am developing a web based webshop with a ms sql back end, but I
> cannot figure out how to do connection based temp tables, so that each
> user gets their own temp table to hold the purchased items.
> any ideas or hints would bery much appreciated
> rgds
> Matt

A better idea is probably to use a single table, with a customer ID or
session ID as part of the key. That way you can store items for some time
and you don't lose any information if the connection from your middle tier
is broken for some reason. You also have an easy way to view aggregate
information for all customers/sessions, and so on.

Since normal temp tables exist per connection and you probably won't have
one new client connection per customer from the middle tier to the database,
it's doubtful if temp tables would be a good solution for you.

Simon|||Dear Matt,
You'll have a tricky time with this approach to shopping carts I think.
Whilst you can create a temp table that persists for only as long as the
connection to database exists - you'd have to keep the database connected to
the webserver permanently and once for every user of the website. This would
be packed full of problems - not least of which would be that you'd run out
of connections pretty quickly.

You've got two main options.

1) Keep the shopping cart on the webserver not in the database - this has a
lot of advantages - 1) If you're choice of scripting language manages
sessions for you (like asp.net) then you're users shopping carts will
dissapear without you having to manage the process of cleaning them up. 2)
It'd be much faster - you wouldn't have to keep hitting the database to add
something into the cart, or to pull up the cart items. 3) You wouldn't hve
to clean up the database for abandoned order (your rate might be as high as
70-80% of orders that get abandoned).

2) Keep the cart in a
"pending orders" table - and keep track of the time that each item was
added, and group the items together either by a cart id or by a customer
number - then you could automate clean up.

Nick
<matt@.fruitsalad.org> wrote in message
news:1126360634.762880.315890@.g43g2000cwa.googlegr oups.com...
> Hello
> I am developing a web based webshop with a ms sql back end, but I
> cannot figure out how to do connection based temp tables, so that each
> user gets their own temp table to hold the purchased items.
> any ideas or hints would bery much appreciated
> rgds
> Matt

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 the database in SQL Server 2000

I am developing a system using VS 2003 with database SQL Server 2000.

In web.config, I have added the following code in it

<sessionState

mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"

sqlConnectionString="data source=127.0.0.1;Database=grandb;Trusted_Connection=yes"

cookieless="false"

timeout="60"

/>

Actually I don't know if the above code is correct. My database is stored in the SQL Server 2000 and named as grandb.

Thank you.

Hi,

You should modify the <sessionState> tag only when you are using OutProc mode. It seems you want to place you connection string in the web.config file, use this sample setting instead:

<

configuration>
<appSettings><addkey="connectionString"value="Data Source=127.0.0.1;uid=xxxx;pwd=xxx;database=grandb"/>

</

appSettings>

In case you are using windows based authentication in your Sql server, then use the Trusted =yes connection instead of username and password.

You can access this connection string in your source files as:

string

strConn = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];

Hope this helps,

Vivek

|||

I add this between appSettings

<add key="DBConnr" value="Data Source=localhost;database=grandb;Trusted=yes" />

However, it still not works...

Any error for that?

Thank you

|||

thtang:

I add this between appSettings

<add key="DBConnr" value="Data Source=localhost;database=grandb;Trusted=yes" />

However, it still not works...

What is the error message are you getting? Are you using Windows authentication in SQL Server or Mixed mode?

Vivek