Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Sunday, March 25, 2012

Data Enabled WebSite

I am looking at developing a data enabled web site. I am quite proficient
with SQL server, VB & ASP. For these reasons I have decided to develop the
site in ASP.NET (learning presently) with an SQL Server backend.
I have been told this is not the way to go and the better alternative is PHP
& MySQL.
I would appreciate any feedback re the pros and cosn of each option and
whether there is truth to this or not.
ThanksIf your quite proficient in that why would you want to change? Being
familiar with a tool(s) goes a long way and can help to reduce costs quite a
bit by being more accurate, confident and faster.
--
Andrew J. Kelly
SQL Server MVP
"Murphy" <murphy@.murphy.com> wrote in message
news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> I am looking at developing a data enabled web site. I am quite proficient
> with SQL server, VB & ASP. For these reasons I have decided to develop the
> site in ASP.NET (learning presently) with an SQL Server backend.
> I have been told this is not the way to go and the better alternative is
PHP
> & MySQL.
> I would appreciate any feedback re the pros and cosn of each option and
> whether there is truth to this or not.
> Thanks
>|||Exactly, my thoughts precisely however if the general opinion was that I was
going down the wrong path then i would be forced to learn new tricks in
order to complete the task correctly.
If there general opinion is that it's mrerly a matter of choice then I'll
stay with what I know.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OoFH5sNoDHA.1884@.TK2MSFTNGP09.phx.gbl...
> If your quite proficient in that why would you want to change? Being
> familiar with a tool(s) goes a long way and can help to reduce costs quite
a
> bit by being more accurate, confident and faster.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Murphy" <murphy@.murphy.com> wrote in message
> news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > I am looking at developing a data enabled web site. I am quite
proficient
> > with SQL server, VB & ASP. For these reasons I have decided to develop
the
> > site in ASP.NET (learning presently) with an SQL Server backend.
> >
> > I have been told this is not the way to go and the better alternative is
> PHP
> > & MySQL.
> >
> > I would appreciate any feedback re the pros and cosn of each option and
> > whether there is truth to this or not.
> >
> > Thanks
> >
> >
>|||Murphy,
Stick with your initial tools. You are building a solution that assumes IIS
and SQL Server, but these are very well accepted technology solutions.
bill burrows
"Murphy" <murphy@.murphy.com> wrote in message
news:uCcCN1NoDHA.2216@.TK2MSFTNGP12.phx.gbl...
> Exactly, my thoughts precisely however if the general opinion was that I
was
> going down the wrong path then i would be forced to learn new tricks in
> order to complete the task correctly.
> If there general opinion is that it's mrerly a matter of choice then I'll
> stay with what I know.
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OoFH5sNoDHA.1884@.TK2MSFTNGP09.phx.gbl...
> > If your quite proficient in that why would you want to change? Being
> > familiar with a tool(s) goes a long way and can help to reduce costs
quite
> a
> > bit by being more accurate, confident and faster.
> >
> > --
> >
> > Andrew J. Kelly
> > SQL Server MVP
> >
> >
> > "Murphy" <murphy@.murphy.com> wrote in message
> > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > I am looking at developing a data enabled web site. I am quite
> proficient
> > > with SQL server, VB & ASP. For these reasons I have decided to develop
> the
> > > site in ASP.NET (learning presently) with an SQL Server backend.
> > >
> > > I have been told this is not the way to go and the better alternative
is
> > PHP
> > > & MySQL.
> > >
> > > I would appreciate any feedback re the pros and cosn of each option
and
> > > whether there is truth to this or not.
> > >
> > > Thanks
> > >
> > >
> >
> >
>|||Get a decent database structure and access.
You already know sql server so will be able to cunstruct
that easily and a decent stored procedure interface.
Without this there is not hope of building a reliable
efficient system. You can spend the time you would have
spent learning a new database on testing and refining this
one.
Adain you should find it easier to learn and be effective
in (make less serious mistakes) in asp.net than in php if
you already know asp well.
If you go for php and mysql you will just be another
beginner trying to hack together a web site.|||Ignore the advice!
I work day in day out with PHP/MySQL and although they are open source,
reliable and easy to work with, I am now opting to go down the .NET route.
SQL Server is a more powerful database and .NET is a more powerful platform
to code on.
"Murphy" <murphy@.murphy.com> wrote in message
news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> I am looking at developing a data enabled web site. I am quite proficient
> with SQL server, VB & ASP. For these reasons I have decided to develop the
> site in ASP.NET (learning presently) with an SQL Server backend.
> I have been told this is not the way to go and the better alternative is
PHP
> & MySQL.
> I would appreciate any feedback re the pros and cosn of each option and
> whether there is truth to this or not.
> Thanks
>|||Not sure its a good idea to ignore the advice... I'm all .NET myself, but
MySQL and PHP certainly is a good "cost free" alternative. Now that's said;
go with .NET and SQL Server!
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> Ignore the advice!
> I work day in day out with PHP/MySQL and although they are open source,
> reliable and easy to work with, I am now opting to go down the .NET route.
> SQL Server is a more powerful database and .NET is a more powerful
platform
> to code on.
> "Murphy" <murphy@.murphy.com> wrote in message
> news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > I am looking at developing a data enabled web site. I am quite
proficient
> > with SQL server, VB & ASP. For these reasons I have decided to develop
the
> > site in ASP.NET (learning presently) with an SQL Server backend.
> >
> > I have been told this is not the way to go and the better alternative is
> PHP
> > & MySQL.
> >
> > I would appreciate any feedback re the pros and cosn of each option and
> > whether there is truth to this or not.
> >
> > Thanks
> >
> >
>|||As I will be hosting the site with a hosting company who provide the SQL db
etc cost is not an issue to me.
"CT" <carstent@.spammersgoawaydotnetservices.biz> wrote in message
news:%23njCwicoDHA.2732@.TK2MSFTNGP11.phx.gbl...
> Not sure its a good idea to ignore the advice... I'm all .NET myself, but
> MySQL and PHP certainly is a good "cost free" alternative. Now that's
said;
> go with .NET and SQL Server!
> --
> Carsten Thomsen
> Enterprise Development with VS .NET, UML, and MSF
> http://www.apress.com/book/bookDisplay.html?bID=105
> "Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
> news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> > Ignore the advice!
> >
> > I work day in day out with PHP/MySQL and although they are open source,
> > reliable and easy to work with, I am now opting to go down the .NET
route.
> >
> > SQL Server is a more powerful database and .NET is a more powerful
> platform
> > to code on.
> >
> > "Murphy" <murphy@.murphy.com> wrote in message
> > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > I am looking at developing a data enabled web site. I am quite
> proficient
> > > with SQL server, VB & ASP. For these reasons I have decided to develop
> the
> > > site in ASP.NET (learning presently) with an SQL Server backend.
> > >
> > > I have been told this is not the way to go and the better alternative
is
> > PHP
> > > & MySQL.
> > >
> > > I would appreciate any feedback re the pros and cosn of each option
and
> > > whether there is truth to this or not.
> > >
> > > Thanks
> > >
> > >
> >
> >
>|||If it's for serious use, go .NET/ASP etc.
If it's for a hobby site (say a VA, if you're afollower of my hobby, FS!)
then MySQl, and PHP are good. Although I still use ASP and SQL.
Angus
"Murphy" <murphy@.murphy.com> wrote in message
news:#KHGm4coDHA.2268@.TK2MSFTNGP12.phx.gbl...
> As I will be hosting the site with a hosting company who provide the SQL
db
> etc cost is not an issue to me.
> "CT" <carstent@.spammersgoawaydotnetservices.biz> wrote in message
> news:%23njCwicoDHA.2732@.TK2MSFTNGP11.phx.gbl...
> > Not sure its a good idea to ignore the advice... I'm all .NET myself,
but
> > MySQL and PHP certainly is a good "cost free" alternative. Now that's
> said;
> > go with .NET and SQL Server!
> >
> > --
> > Carsten Thomsen
> > Enterprise Development with VS .NET, UML, and MSF
> > http://www.apress.com/book/bookDisplay.html?bID=105
> > "Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
> > news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> > > Ignore the advice!
> > >
> > > I work day in day out with PHP/MySQL and although they are open
source,
> > > reliable and easy to work with, I am now opting to go down the .NET
> route.
> > >
> > > SQL Server is a more powerful database and .NET is a more powerful
> > platform
> > > to code on.
> > >
> > > "Murphy" <murphy@.murphy.com> wrote in message
> > > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > > I am looking at developing a data enabled web site. I am quite
> > proficient
> > > > with SQL server, VB & ASP. For these reasons I have decided to
develop
> > the
> > > > site in ASP.NET (learning presently) with an SQL Server backend.
> > > >
> > > > I have been told this is not the way to go and the better
alternative
> is
> > > PHP
> > > > & MySQL.
> > > >
> > > > I would appreciate any feedback re the pros and cosn of each option
> and
> > > > whether there is truth to this or not.
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>|||Hi
ASP.NET and SQL Server is the way forward.
Good place to get ASP.NET and SQL Server hosting web space is:
http://www.dotnet-webhosting.com/sql-server-hosting/default.aspx
£22/Month (included web space, SQL Server DB and free domain)
Regards
G,
"Angus Lepper" <CEO@.AngusEnterprises.cjb.net> wrote in message news:<OH9CvnCwDHA.1272@.TK2MSFTNGP12.phx.gbl>...
> If it's for serious use, go .NET/ASP etc.
> If it's for a hobby site (say a VA, if you're afollower of my hobby, FS!)
> then MySQl, and PHP are good. Although I still use ASP and SQL.
> Angus
> "Murphy" <murphy@.murphy.com> wrote in message
> news:#KHGm4coDHA.2268@.TK2MSFTNGP12.phx.gbl...
> > As I will be hosting the site with a hosting company who provide the SQL
> db
> > etc cost is not an issue to me.
> >
> > "CT" <carstent@.spammersgoawaydotnetservices.biz> wrote in message
> > news:%23njCwicoDHA.2732@.TK2MSFTNGP11.phx.gbl...
> > > Not sure its a good idea to ignore the advice... I'm all .NET myself,
> but
> > > MySQL and PHP certainly is a good "cost free" alternative. Now that's
> said;
> > > go with .NET and SQL Server!
> > >
> > > --
> > > Carsten Thomsen
> > > Enterprise Development with VS .NET, UML, and MSF
> > > http://www.apress.com/book/bookDisplay.html?bID=105
> > > "Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
> > > news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> > > > Ignore the advice!
> > > >
> > > > I work day in day out with PHP/MySQL and although they are open
> source,
> > > > reliable and easy to work with, I am now opting to go down the .NET
> route.
> > > >
> > > > SQL Server is a more powerful database and .NET is a more powerful
> platform
> > > > to code on.
> > > >
> > > > "Murphy" <murphy@.murphy.com> wrote in message
> > > > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > > > I am looking at developing a data enabled web site. I am quite
> proficient
> > > > > with SQL server, VB & ASP. For these reasons I have decided to
> develop
> the
> > > > > site in ASP.NET (learning presently) with an SQL Server backend.
> > > > >
> > > > > I have been told this is not the way to go and the better
> alternative
> is
> PHP
> > > > > & MySQL.
> > > > >
> > > > > I would appreciate any feedback re the pros and cosn of each option
> and
> > > > > whether there is truth to this or not.
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >|||Hi
We offer a very good and reliable service.
http://www.nt-webspace.com
Only £6 / Month and as a special offer we are giving away free domain
till 31st Dec 2003.
Here are the plan details
==========================NO SETUP FEES!
30 day Money Back Guarantee
Windows 2003 ® / IIS ® 6.0 Servers!
24 hour - 7 day a week support!
Unlimited web page updates!
Personal cgi-bin directory
200 MB Disk Space! (Special Offer now 400 MB !! )
Pop3 E-mail boxes with unlimited aliases and auto-responders!
2 GB / Month Bandwidth Transfer!
Microsoft Active Server ?
FTP access for updating web site
Microsoft Access ®/ FoxPro ® Database Support!
Microsoft MS SQL Server 7.0 (£27/mo. additional
Regards
NT-Webspace.com
"Angus Lepper" <CEO@.AngusEnterprises.cjb.net> wrote in message news:<OH9CvnCwDHA.1272@.TK2MSFTNGP12.phx.gbl>...
> If it's for serious use, go .NET/ASP etc.
> If it's for a hobby site (say a VA, if you're afollower of my hobby, FS!)
> then MySQl, and PHP are good. Although I still use ASP and SQL.
> Angus
> "Murphy" <murphy@.murphy.com> wrote in message
> news:#KHGm4coDHA.2268@.TK2MSFTNGP12.phx.gbl...
> > As I will be hosting the site with a hosting company who provide the SQL
> db
> > etc cost is not an issue to me.
> >
> > "CT" <carstent@.spammersgoawaydotnetservices.biz> wrote in message
> > news:%23njCwicoDHA.2732@.TK2MSFTNGP11.phx.gbl...
> > > Not sure its a good idea to ignore the advice... I'm all .NET myself,
> but
> > > MySQL and PHP certainly is a good "cost free" alternative. Now that's
> said;
> > > go with .NET and SQL Server!
> > >
> > > --
> > > Carsten Thomsen
> > > Enterprise Development with VS .NET, UML, and MSF
> > > http://www.apress.com/book/bookDisplay.html?bID=105
> > > "Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
> > > news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> > > > Ignore the advice!
> > > >
> > > > I work day in day out with PHP/MySQL and although they are open
> source,
> > > > reliable and easy to work with, I am now opting to go down the .NET
> route.
> > > >
> > > > SQL Server is a more powerful database and .NET is a more powerful
> platform
> > > > to code on.
> > > >
> > > > "Murphy" <murphy@.murphy.com> wrote in message
> > > > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > > > I am looking at developing a data enabled web site. I am quite
> proficient
> > > > > with SQL server, VB & ASP. For these reasons I have decided to
> develop
> the
> > > > > site in ASP.NET (learning presently) with an SQL Server backend.
> > > > >
> > > > > I have been told this is not the way to go and the better
> alternative
> is
> PHP
> > > > > & MySQL.
> > > > >
> > > > > I would appreciate any feedback re the pros and cosn of each option
> and
> > > > > whether there is truth to this or not.
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >|||www.oneandone.co.uk are rather good.
Angus
"NT-Webspace.com" <gbaryah@.hotmail.com> wrote in message
news:792f1e6b.0312120107.7c2f9b03@.posting.google.com...
> Hi
> We offer a very good and reliable service.
> http://www.nt-webspace.com
> Only £6 / Month and as a special offer we are giving away free domain
> till 31st Dec 2003.
> Here are the plan details
> ==========================> NO SETUP FEES!
> 30 day Money Back Guarantee
> Windows 2003 ® / IIS ® 6.0 Servers!
> 24 hour - 7 day a week support!
> Unlimited web page updates!
> Personal cgi-bin directory
> 200 MB Disk Space! (Special Offer now 400 MB !! )
> Pop3 E-mail boxes with unlimited aliases and auto-responders!
> 2 GB / Month Bandwidth Transfer!
> Microsoft Active Server T
> FTP access for updating web site
> Microsoft Access ®/ FoxPro ® Database Support!
> Microsoft MS SQL Server 7.0 (£27/mo. additional
> Regards
> NT-Webspace.com
>
> "Angus Lepper" <CEO@.AngusEnterprises.cjb.net> wrote in message
news:<OH9CvnCwDHA.1272@.TK2MSFTNGP12.phx.gbl>...
> > If it's for serious use, go .NET/ASP etc.
> >
> > If it's for a hobby site (say a VA, if you're afollower of my hobby,
FS!)
> > then MySQl, and PHP are good. Although I still use ASP and SQL.
> >
> > Angus
> > "Murphy" <murphy@.murphy.com> wrote in message
> > news:#KHGm4coDHA.2268@.TK2MSFTNGP12.phx.gbl...
> > > As I will be hosting the site with a hosting company who provide the
SQL
> > db
> > > etc cost is not an issue to me.
> > >
> > > "CT" <carstent@.spammersgoawaydotnetservices.biz> wrote in message
> > > news:%23njCwicoDHA.2732@.TK2MSFTNGP11.phx.gbl...
> > > > Not sure its a good idea to ignore the advice... I'm all .NET
myself,
> > but
> > > > MySQL and PHP certainly is a good "cost free" alternative. Now
that's
> > said;
> > > > go with .NET and SQL Server!
> > > >
> > > > --
> > > > Carsten Thomsen
> > > > Enterprise Development with VS .NET, UML, and MSF
> > > > http://www.apress.com/book/bookDisplay.html?bID=105
> > > > "Andrew Banks" <banksy@.blablablueyonder.co.uk> wrote in message
> > > > news:TD7pb.3738$Yl6.26235112@.news-text.cableinet.net...
> > > > > Ignore the advice!
> > > > >
> > > > > I work day in day out with PHP/MySQL and although they are open
> > source,
> > > > > reliable and easy to work with, I am now opting to go down the
.NET
> > route.
> > > > >
> > > > > SQL Server is a more powerful database and .NET is a more powerful
> > platform
> > > > > to code on.
> > > > >
> > > > > "Murphy" <murphy@.murphy.com> wrote in message
> > > > > news:e9WP3fNoDHA.1020@.TK2MSFTNGP09.phx.gbl...
> > > > > > I am looking at developing a data enabled web site. I am quite
> > proficient
> > > > > > with SQL server, VB & ASP. For these reasons I have decided to
> > develop
> > the
> > > > > > site in ASP.NET (learning presently) with an SQL Server backend.
> > > > > >
> > > > > > I have been told this is not the way to go and the better
> > alternative
> > is
> > PHP
> > > > > > & MySQL.
> > > > > >
> > > > > > I would appreciate any feedback re the pros and cosn of each
option
> > and
> > > > > > whether there is truth to this or not.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

Wednesday, March 21, 2012

Data disappear - SQL server 2000 / ASP interface

Hello,
What could possibly cause data in the SQL server database to be
removed, except being deleted manually? We had a couple of situations
where data in certain records disappeared although the records were
still there. The data is entered and editted through the web interface
in ASP. The web interface is accessed by anyone who has an account in
our database.
I am more of a web programmer, not a SQL server administrator, so not
very familiar with SQL Server log or error tracking. If you can
suggest any way to track this kind of events (data disappearing), I
would appreciate it very much.

HB KimHB Kim (haebin@.andrew.cmu.edu) writes:
> What could possibly cause data in the SQL server database to be
> removed, except being deleted manually? We had a couple of situations
> where data in certain records disappeared although the records were
> still there. The data is entered and editted through the web interface
> in ASP. The web interface is accessed by anyone who has an account in
> our database.
> I am more of a web programmer, not a SQL server administrator, so not
> very familiar with SQL Server log or error tracking. If you can
> suggest any way to track this kind of events (data disappearing), I
> would appreciate it very much.

I'm afraid that this description is a bit too vague to work from. Do I
understand you right that you had data for a car with the license
plate ABC123 like make, colour, placement of steering wheel etc. Now
you still have ABC123 in the database and can see it through the web
form, but there is no longer information about the make and colour?

For anyone who does not know your application, it is difficult to tell
whether this indicates an error or not. If you, as you say, users can
open and edit data, someone may have decided to erase some information -
or done so by mistake. If you want to protect yourself against this,
you may need to devise some permission scheme, so that not anyone can
change the data. You may also want to implement some auditing scheme.

There might of course be technical problems that causes the data go
away. Bugs happens in the best families.

The one recommendation I can give is to check out Lumgient Log Explorer
at http://www.lumigent.com/. This is a tool that permits you to
examine the transaction log, to find when and who submitted a certain
statement.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi,

I experienced data disappear. Four tables with a 1-n relationship are
heavily updated and are target of some big queries.

Cenario:
Table A with ~3.000 rows sometimes rollback updates
Table B with ~5.000 rows sometimes rollback updates and inserts
Table C with ~60.000 rows have several rollbacked inserts
Table D with ~2.500.000 rows is havely rollbacked

The workflow:
1) Users inserts a row at table A
2) Users inserts one or more rows at B
3) Users inserts lots of rows at C
4) Users inserts lots of rows at D
5) Users updates D
6) Users updates B and C
7) Users updates A and prints a report with all content from the four
tables concerning with the row from A
8) Minutes or hours later users checks for that report and updates A
9) Days later users print a big report from all month data

Problem:
At steps 8) and 9) users tell some rows from some tables are vanished!

Details:
All update, delete and insert are performed by Stored Procedures.
Some selects are performed by no indexed views.
Some selects use more than 12 joins!
Reports are printed before the data vanished.
Time to data disapear (at users discretion) varies from minutes to days.
Each insert, each update, each delete for EACH ROW, is a explicit
transaction.
Im using MSSQLServer 2000 last sp and Windows Server 2000.
The server and users lies at the same network, the users uses a client
application (not web).
The users app connects with BDE but i coded a newer version with ADO but
this not worked.
All worked fine for sometime but sundenly this problem appears.
Users tell the loss of data is harder now the loss is growing.
The LAN posses 2 hub is slowdown from 100MB to 10MB all network (the
number of users is constantly growing).
All server memory is used, some locks take too long some deadlocks errors
arise.
I put a trigger to make sure any insert/update at the problematic tables
inputs a row at a dummy table (since i have the report i can search for
the row) no missing row are found at the dummy table.
Some triggers make a complex validations at some inserts/tables and
roolbacks the transaction, but when tested these triggers works fine.
I run checkdb, rebuild indexes checked realtionships, stored procedures,
application, triggers, etc.

Conclusions:
We need a better server with a lot more memory and a rebuild at the
network. ;)
This problem can be from a deadlock for sources like memory+network+diskIO
and the SQLServer cannot dont handle it.
The locks for sources are handled by windows but maybe the OS failed to
comunicate deadlocks problems to SQLserver.

Workaround:
I activated de server log to write any deadlock, timeout is -1(infinite) a
new server (and switches) are arriving shortly.
I hope this solves the problem. Someone experienced data loss like it?

Jean|||"jean_bulinckx" <jcb@.cin.ufpe.br> wrote in message
news:81d698784dfc937b76d33f9a7d9e5831@.localhost.ta lkaboutdatabases.com...
> Hi,
> I experienced data disappear. Four tables with a 1-n relationship are
> heavily updated and are target of some big queries.
> Cenario:
> Table A with ~3.000 rows sometimes rollback updates
> Table B with ~5.000 rows sometimes rollback updates and inserts
> Table C with ~60.000 rows have several rollbacked inserts
> Table D with ~2.500.000 rows is havely rollbacked
> The workflow:
> 1) Users inserts a row at table A
> 2) Users inserts one or more rows at B
> 3) Users inserts lots of rows at C
> 4) Users inserts lots of rows at D
> 5) Users updates D
> 6) Users updates B and C
> 7) Users updates A and prints a report with all content from the four
> tables concerning with the row from A
> 8) Minutes or hours later users checks for that report and updates A
> 9) Days later users print a big report from all month data
> Problem:
> At steps 8) and 9) users tell some rows from some tables are vanished!
> Details:
> All update, delete and insert are performed by Stored Procedures.
> Some selects are performed by no indexed views.
> Some selects use more than 12 joins!
> Reports are printed before the data vanished.
> Time to data disapear (at users discretion) varies from minutes to days.
> Each insert, each update, each delete for EACH ROW, is a explicit
> transaction.
> Im using MSSQLServer 2000 last sp and Windows Server 2000.
> The server and users lies at the same network, the users uses a client
> application (not web).
> The users app connects with BDE but i coded a newer version with ADO but
> this not worked.
> All worked fine for sometime but sundenly this problem appears.
> Users tell the loss of data is harder now the loss is growing.
> The LAN posses 2 hub is slowdown from 100MB to 10MB all network (the
> number of users is constantly growing).
> All server memory is used, some locks take too long some deadlocks errors
> arise.
> I put a trigger to make sure any insert/update at the problematic tables
> inputs a row at a dummy table (since i have the report i can search for
> the row) no missing row are found at the dummy table.
> Some triggers make a complex validations at some inserts/tables and
> roolbacks the transaction, but when tested these triggers works fine.
> I run checkdb, rebuild indexes checked realtionships, stored procedures,
> application, triggers, etc.
> Conclusions:
> We need a better server with a lot more memory and a rebuild at the
> network. ;)
> This problem can be from a deadlock for sources like memory+network+diskIO
> and the SQLServer cannot dont handle it.
> The locks for sources are handled by windows but maybe the OS failed to
> comunicate deadlocks problems to SQLserver.
> Workaround:
> I activated de server log to write any deadlock, timeout is -1(infinite) a
> new server (and switches) are arriving shortly.
> I hope this solves the problem. Someone experienced data loss like it?
> Jean

So at step 7 the user can see data, but at step 8 it's not there? If so,
when does the transaction COMMIT? Before or after the user checks the data?
If the user views the data, and then the transaction rolls back, that might
explain it.

If not, you could run a Profiler trace filtered to show only DELETE
statements on the problem tables. That should tell you how and when the rows
are deleted.

Simon|||Hi Simon,

Each transaction (each insert, update) is immediately commited (well, at
least at the Stored procedures the code is ok "begin tran if @.@.error
rollback else commit"). The report at step 7) is printed after all job is
done.
Because a several lack of resources (memory and net) im not able to run a
profile at the server. When i try to open the managment folder at the
Enterprise Manager a "timeout" arise. The profiler is a useful tool but
make a overhead the server at this moment canot handle. I put triggers at
the tables just in case a bad user delete or change the rows but it dont
worked for the missing rows.
Im inclined to a timeout or deadlock issue. I activated the server error
log to write about any deadlock. Now i searching for orphaned conections,
maybe a extend rollback is made for a connection broken or the transactin
is waiting for a not longer valid connection.
Ill try to trace all rollbacks.
Remember not a single tran but lots os trans are missing here while
another bunch of trans works fine at the same time and for the same
session.

Jean

P.S.im using readcommited isolation|||[posted and mailed, please reply in news]

jean_bulinckx (jcb@.cin.ufpe.br) writes:
> The workflow:
> 1) Users inserts a row at table A
> 2) Users inserts one or more rows at B
> 3) Users inserts lots of rows at C
> 4) Users inserts lots of rows at D
> 5) Users updates D
> 6) Users updates B and C
> 7) Users updates A and prints a report with all content from the four
> tables concerning with the row from A
> 8) Minutes or hours later users checks for that report and updates A
> 9) Days later users print a big report from all month data
> Problem:
> At steps 8) and 9) users tell some rows from some tables are vanished!

First, if business rules requires all or none of all these rows to be
inserted, all should be packed into one transaction.

There are plenty of possible reasons, and without knowledge of your
application it is difficult to tell. The two main tracks are: a) someone
deleted the rows. b) the rows were never committed.

a) could be because of a badly coded program. I recall a horror story from
our application. We could find that random rows in one table were deleted,
and we had no idea of why. I eventually decided to track down the issue,
and found a function that stored procedure that for deleted rows from this
table. The problem was that id that was passed was declared as int in VB,
which is only 16 bits, so the function deleted the wrong rows. (And there
was not need to call the procedure, because the correct rows were handled
anyway.)

b) can happen if timeouts are not handled correctly. Timeouts are client-
side events of which SQL Server does not know about. When a client gets a
timeout, it cancels the query. But cancelling a query does not rollback
any outstanding transactions, even if the transaction was started by
the procedure that was cancelled. So after a timeout, you should always
issue a rollback. (Or disconnect and reconnect.) Or simply set the
timeout to 0, so you don't get them.

Since you say "some rows from some tables", I'm inclined to believe
that a) is more likely. But if you can deduced that all missing rows
are from the last part of the operation, improper timeout handling is
not an unlikely culprit.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thx guys,

I canot tell too much about the application...

Just the DBA have total control over de database and server. But we are
redesining the server security.

Some more facts...

1) After a major tunning (focus at selects take less time) the number of
missing row decrease a lot!

2) The updates are not packed because i wish to validate rows at
onde-to-one basis and because i wish short transactions. A dozen short
transactions are prefearable than a big transaction.

3) The missing row affects the most frequent updated tables, the most used
and big tables are missind much more rows.

4) The row appear to be "deleted" at random.
if 100 rows are inserted or updated 10 are rollbacked.

I think its a timeout problem.

Jean|||Thx guys,

I canot tell too much about the application...

Just the DBA have total control over de database and server. But we are
redesining the server security.

Some more facts...

1) After a major tunning (focus at selects take less time) the number of
missing row decrease a lot!

2) The updates are not packed because i wish to validate rows at
onde-to-one basis and because i wish short transactions. A dozen short
transactions are prefearable than a big transaction.

3) The missing row affects the most frequent updated tables, the most used
and big tables are missind much more rows.

4) The row appear to be "deleted" at random.
if 100 rows are inserted or updated 10 are rollbacked.

I think its a timeout problem.

Jean|||jean_bulinckx (jcb@.cin.ufpe.br) writes:
> I canot tell too much about the application...
> Just the DBA have total control over de database and server. But we are
> redesining the server security.

It is of course your choice how much information you want to share
about your application. But the less you tell us, the smaller is the
likelyhood that you will get useful advice.

> 2) The updates are not packed because i wish to validate rows at
> onde-to-one basis and because i wish short transactions. A dozen short
> transactions are prefearable than a big transaction.

To avoid contention, maybe. But when determining the transaction length,
the prime focus must be on business rules. If you do:

BEGIN TRANSACTION
INSERT A ...
COMMIT TRANSACTION

BEGIN TRANSACTION
INSERT B ...
COMMIT TRANSACTION

You must be sure that it is permissible that only the first transaction
is carried out. If your application would be inconsistent if this happened,
then you must have in all transaction. If you ignore that, then you should
be surprised if you are missing rows.

If you need to perform validation row-by-row, one option could be to use
temp tables to store the data, and not until you are done insert into
the target table. A variation is to use permanent tables that are
process-keyed. (A process-key can be as simple as @.@.spid, but that does
not work in a disconnected environment.)

> 4) The row appear to be "deleted" at random.
> if 100 rows are inserted or updated 10 are rollbacked.
> I think its a timeout problem.

Actually, to be honest, I think it is a problem with poor application
design.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thx for the replys guys!

These inserts/updates are made by users, One-to-one. Sometimes a user
select a lot of rows to update or insert but at the cliente-side there a
loop to insert ono-to-one (i guess just to reuse the same insert
procedure).

I dont designed the app im just a fireman ;) working at server side.
This thing use ADO and i canot find a timeout handle at code. All i find
is a ordinary "try stored_procedure.execute catch"

Im not sure ADO automatizes any sort of work about timeout but i thing
the app is not handling lock timeouts and deadlocks. The timeout is set to
0 what about close the connection while there are a blocked transaction?

Jean|||jean_bulinckx (jcb@.cin.ufpe.br) writes:
> Im not sure ADO automatizes any sort of work about timeout but i thing
> the app is not handling lock timeouts and deadlocks. The timeout is set to
> 0 what about close the connection while there are a blocked transaction?

If the command timeout is set to 0, then there should not be any timeouts.
But it is important to set the timeout on the command object. The one on
the connection object is not inherited by the command object.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspsql

Sunday, March 11, 2012

Data Connection to SQL Server 2000 using C#

I have asp code that uses C# to create a SQL connection and a command. Then I create a data set and fill the data set using my comand. Finally I bind my data set to a data grid named myDataGrid. I am not sure where myDataGrid comes from since it is never defined. Where does myDataGrid come from? Also, I believe that I do not need to call page_Load since auto wire is set to true by default so it is my understanding that this method page_Load will be called by default.
void page_load(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'"); SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection);
DataSet ds = new DataSet();
myCommand.Fill(ds, "people");
MyDataGrid.DataSource=ds.Tables["people"].DefaultView;
MyDataGrid.DataBind();
}

When I place a data grid controll on my page named myDataGrid, I do not see a data grid and there is no data either. The code in the HTML looks like this:

<body>
<form runat="server">
<p>
<asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid>
</p>
</form>
</body>
I tried using debug that comes with the .Net framework (since I am using Web Matrix) but I get an error saying no symbols were found for this document when setting break points. What are symbols and why do I need them?
So, I basically have four (4) important questions that I need help answering:
1) Why do I not have any data in my data grid?
2) Where did myDataGrid come from?
3) Is the page_Load method called by default if auto wire is set to true or not declared?
4) Why do I need symbols for debug?
Below is all my code in one complete view:
<%@. Page Language="C#" %>
<%@. Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %>
<%@. import Namespace="System.Data" %>
<%@. import Namespace="System.Data.SqlClient" %>
<script runat="server">

// Insert page code here
//

</script>
<html>
<head>
<script language="C#">
void page_load(object sender, EventArgs e)
{
SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'");
SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection);

DataSet ds = new DataSet();
myCommand.Fill(ds, "people");

MyDataGrid.DataSource=ds.Tables["people"].DefaultView;
MyDataGrid.DataBind();
}

</script>
</head>
<body>
<form runat="server">
<p>

</p>
<p>
<asp:Label id="Label1" runat="server">This is a test!</asp:Label>
</p>
<p>
<asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid>
</p>
</form>
</body>
</html>
Thanks,
Ryan

(1) you could put a if not ispostback condition in your page_load.
(2) You could set the autogeneratecolumns property of the datagrid to true. I am not good at C#. So I wouldnt try writing code for you.

Thursday, March 8, 2012

Data Binding-DataAdapter

Hi i'm a new to ASP.NET and for some reason when i click the Next button in the code below, the pageIndex does not change. Please assist, Basically what i'm trying to do is to use DataAdapter.fill but passing in the start index and the number of records to pull from the dataset table.

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.OleDb;

publicpartialclassHome : System.Web.UI.Page

{

//Connection

OleDbConnection dbConn;

//discount that can be change by user using a gui interface

//CurrentPage

int pageIndex = 0;double discount = 0.15 ;

protectedvoid Page_Load(object sender,EventArgs e)

{

// homeGridView.Visible = true;

BindList();

}

protectedstring getSpecial(string price,object sale)

{

String special ="";if (sale.ToString().CompareTo("True") == 0)

{

special =String.Format("{0:C}",double.Parse(price) * (1-discount));

}

return special;

}

protectedvoid BindList()

{

//Creating an object for the 'PagedDataSource' for holding the data.

//PagedDataSource objPage = new PagedDataSource();

try

{

//open connection

openConnection();

//sql command

string columns ="*";

string SqlCommand ="Select " + columns +" from Books";

//create adapters and DataSet

OleDbDataAdapter myAdapter =newOleDbDataAdapter(SqlCommand, dbConn);DataSet ds =newDataSet("bSet");

//create table

DataTable dt =newDataTable("Books");myAdapter.Fill(ds, pageIndex, 9,"Books");

Response.Write("Page Index: "+pageIndex);

//create table data view

DataView dv =newDataView(ds.Tables["bTable"]);

booksDataList.DataSource = ds;

booksDataList.DataBind();

myAdapter.Dispose();

dbConn.Close();

}

catch (Exception ex)

{

Response.Write("Exception thrown in BindList()");

dbConn.Close();

throw ex;

}

}

publicvoid openConnection()

{

string provider="Microsoft.Jet.OLEDB.4.0";

string dataSource ="C:/Documents and Settings/Owner/My Documents/Visual Studio 2005/WebSites/E-BookOnline/App_Data/BooksDB.mdb";

dbConn =newOleDbConnection("Provider =" + provider +";" +"Data Source =" + dataSource);

dbConn.Open();

}

protectedvoid nextClick(object sender,EventArgs e)

{

pageIndex=pageIndex+1;

Response.Write("In nextClick"+pageIndex);

BindList();

}

protectedvoid prevClick(object sender,EventArgs e)

{

if (pageIndex > 0)

{

pageIndex=pageIndex-1;

BindList();

}

}

}

It is not advisable to use DataAdpater to page records... instead of this you need to use queries for that but anyway you can found this article useful.

http://msdn2.microsoft.com/en-us/library/tx1c9c2f(VS.80).aspx

Satya

Data Binding with ReportViewer Control to an Independent Data Table

Here is what I am trying to do. I am using ASP.NET 2.0. I have created a data set called Stocks data table called Data and put it in the App_Code folder. I am filling the data table from data in a csv file located on the web. I am populating the data table with the following code. This code works because I checked the record count and it shows 21 records for the Data data table.

publicstaticDataSet Convert() { WebClient Client =newWebClient(); Stream myStream = Client.OpenRead("http://mysite.com/table.csv"); StreamReader myStreamReader =newStreamReader(myStream); Stocks myStocks =newStocks(); string line = myStreamReader.ReadLine(); string allData = myStreamReader.ReadToEnd(); string[] rows = allData.Split("\r\n".ToCharArray()); foreach (string rin rows) { string[] items = r.Split(",".ToCharArray()); myStocks.Tables["Data"].Rows.Add(items); } return myStocks; }

I am trying to bind the data in this table to a report. I added a report to my project and selected the fields from the data table. I then added a ReportViewer control to the web form. I'm not sure how to configure the ObjectDataSource that is added to the web form after the ReportViewer control is added. It firsts asks to select business object. I have the following options. I'm not sure what to select.

Stocks

Stocks + DataTable

Stocks + DataRow

Stocks + DataRowChangeEvent

Stocks + DataRowChangeEventHandler

Next I need to define a data method. Not sure what option to select. I just want to bind the report to the data table and return the rows.

Any help would be appreciated. Thanks.

Weste

Once you drag and drop the report viewer in the aspx page, you will get a smart tag next to your report viewe. From that select the repot.rdlc.

Itr will automatically configure the object datasorce for you.

Did you design your report.rdlc using the dataset you created?

|||

Yes, that is what I already tried and it didn't work. It didn't configure the datasource correctly. I received the following error.

An error has occurred during report processing.
The type specified in the TypeName property of ObjectDataSource 'ObjectDataSource1' could not be found.

This is the code that was automatically added after I added the ReportViewer

<asp:ObjectDataSourceID="ObjectDataSource1"runat="server"SelectMethod="GetData"

TypeName="StcoksTableAdapters."></asp:ObjectDataSource>

I'm not sure how to configure the ObjectDataSource that is added to the web form after the ReportViewer control is added. It firsts asks to select business object. I have the following options. I'm not sure what to select.

Stocks

Stocks + DataTable

Stocks + DataRow

Stocks + DataRowChangeEvent

Stocks + DataRowChangeEventHandler

It then asks me to choose a method. Some of the available options are

Clone(), returns DataSet
Copy(), returns DataSet
CreateDataReader(), returns DataTableReader

I have done other reports using a SQL datasource and they work fine. It works somewhat different without a SQL datasource. I am having trouble finding any documentation to assist me. Thanks for your help.

Weste

|||

I resolved the issue. I added a class called StockData. I moved the code for the Convert procedure into this class. I then configured the ObjectDataSource as follows:

Business Object: StockData
Select Method: Convert(), returns DataSet

Wednesday, March 7, 2012

data base access

Hi,
I have problem accessing my sqlDatabase via asp.net
When running a test application I get the following error message:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'P900\ASPNET'.

I know the connection to the db is ok since I can gain access from a simple console application.

Anybody knows what's wrong and how to fix it??
Many thanks,

Cat33Is your ASPNET user on machine P900 a user in the SQL Server you are trying to connect to?

If you are using integrated security, a console mode applicaiton might work because integrated security while you are running a console mode application uses YOUR security context. Running an ASP.NET application, you are using the ASP.NET users' security context (ASPNET by default).

You need to either add the ASPNET user to SQL Server or use a username and password.

Look at the different possible connection strings here:

www.connectionstrings.com|||Ok, thanks for quick response. I have one simple question however;
How do I add the ASPNET user to the SQL Server?
Thanks in advance,
Cat33|||Do you have Enterprise Manager? If so, Expand out the Security folder, and right click on Logins and add a new login.

If not, there is a command line tool called OSQL you can use. Find it and add the folder to the path, or from the folder where OSQL is, run the following:


osql -S servername\instancename -E -q
--Line numbers will appear
EXEC sp_grantlogin 'COMPUTERNAME\ASPNET'
go
use <databasename>
go
EXEC sp_grantdbaccess 'COMPUTERNAME\ASPNET'
go
EXEC sp_addrolemember 'db_owner', 'COMPUTERNAME\ASPNET'
go

|||Hi,
Sorry to have to plague you with this access question, but after having done what you said, using the osql-tool, nothing improved. I still get the same Error Message, wheré the line 299 is hightlighted. I'm running Framework 1.1 with IIS 5.1 on a XP Pro machine. I have earlier been able to access the database so I simply don't know what to do. I have seen to it that the ASPNET account has been added to the directories in question. What do I do now? Do you have any idea as to where the source to the error is?
Thanks again,
Catharina

Error Message:

Login failed for user 'P900\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'P900\ASPNET'.

Source Error:

Line 294:
Line 295:cmd = new SqlCommand(sql, con);
Line 296:con.Open();
Line 297:
Line 298:bool doredirect = true;

Source File: c:\inetpub\wwwroot\webapperikspage\start\newuser.aspx.cs Line: 296

Stack Trace:

[SqlException: Login failed for user 'P900\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
WebAppEriksPage.start.NewUser.InsertUser() in c:\inetpub\wwwroot\webapperikspage\start\newuser.aspx.cs:296
WebAppEriksPage.start.NewUser.btnAccept_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapperikspage\start\newuser.aspx.cs:147
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()|||When you ran the script in the previous message, you did replace COMPUTERNAME with your computer's name (P900), correct? Were there any error messages when you ran those lines through OSQL?|||Hi,
this is what I wrote:
osql - S P900\NetSDK -E -q
1> EXEC sp_grantlogin 'P900\ASPNET'
2> go

1> use Northwind
2> go

1> EXEC sp_grantdbaccess 'P900\ASPNET'
2> go

1> EXEC sp_addrolemember 'db_owner', 'P900\ASPNET'
2>go

1>exit
and I got no error messages

/Catharina|||OK. Also, replace Northwind with the name of the database you want to use. Northwind is a sample database used for that script.|||Well, at this stage the Northwind database is the database I'm using since this is a test trial to see that things work, which they don't, and I can access that database via a console application and also a Windows application.
Any more leads?|||If you added the user to the database, and there were no errors, then I cannot think of anything else.

Can you show your exact connection string (it should not have any password in it, so you should be able to just cut and paste it). If you did have access to Enterprise Manager, I would suggest looking there to verify that the user is really there.|||

con = new SqlConnection("server= p900\\NetSDK; Trusted_Connection=yes; database= Northwind");
I don't have access to Enterprise Manager, can I verify via osql?
Cheers,
Catharina|||When you start OSQL, rather than


osql -S servername\instancename -E -q

Should be, in your case:


osql -S p900\NetSDK -E -q

I have always used Trusted_Connection=true rather than =yes, so I would try that.

Saturday, February 25, 2012

data acess class

hi
i was reading book about asp.net and i found example for a dataacess class but i didn't understand this part

Private m_FieldData As New NameObjectCollection
Private _m_ConnectionString As String
Private m_dbConnection As SqlConnection
Private Sub AddParameters( _
ByVal objCommand As SqlCommand, _
ByVal objValues() As Object)

Dim objValue As Object
Dim I As Integer
Dim objParameter As SqlParameter

objCommand.Parameters.Clear()
SqlCommandBuilder.DeriveParameters(objCommand)

I = 0
For Each objParameter In objCommand.Parameters
If objParameter.Direction = ParameterDirection.Input _
Or objParameter.Direction = _
ParameterDirection.InputOutput Then

objValue = objValues(I)
objParameter.Value = objValue
I = I + 1
End If
Next
End Sub

Private Sub AddFieldParameters _
(ByVal objCommand As SqlCommand)

Dim objParameter As SqlParameter

objCommand.Parameters.Clear()
SqlCommandBuilder.DeriveParameters(objCommand)

For Each objParameter In objCommand.Parameters
objParameter.Value = _
_FieldData.Item(objParameter.ParameterName. _
Substring(1))
Next
End Sub
Public Function ExecDataReader _
(ByVal strStoredProc As String, _
ByVal ParamArray objValues() As Object) _
As SqlDataReader

Dim objCommand As SqlCommand
Dim objReader As SqlDataReader

objCommand = New SqlCommand

objCommand.CommandText = strStoredProc
objCommand.CommandType = CommandType.StoredProcedure
objCommand.Connection = dbConnection

Try
objCommand.Connection.Open()
If (objValues.Length = 0) Then
AddFieldParameters(objCommand)
Else
AddParameters(objCommand, objValues)
End If
objReader = objCommand. _
ExecuteReader(CommandBehavior.CloseConnection)
Catch ex As Exception
If objCommand.Connection.State.Open Then
objCommand.Connection.Close()
End If
End Try

Return objReader
End Function
can anybody help me what the author want to doTamer, can you be more specific?

Thanks|||hi i don't understand sub AddParameters and addfieldparameter
and why to add values as an array
and the parameter have only one single value why to pass an array of object i can pass a single value hope u understand me|||I'm going to have to kind of guess here as I don't know the source or the context of the script. That being said

Looking at just the AddFieldParameters sub:
---------------------------------
Private Sub AddFieldParameters (ByVal objCommand As SqlCommand)

Dim objParameter As SqlParameter

objCommand.Parameters.Clear()
SqlCommandBuilder.DeriveParameters(objCommand)

For Each objParameter In objCommand.Parameters
objParameter.Value = FieldData.Item(objParameter.ParameterName.Substring(1))
Next
End Sub
---------------------------------

I read this as the SQL command is being passed into the sub as a value and that value can have multiple lines to it. The FieldData object is being created with each line of the SQL command as a different entry in the array.

The AddParameters looks pretty much the same.

Does this answer your question?

I can look into this further if you provide me with the origional source and location of the script.

Thanks

Data Acess aplication block

Hi
I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.
I am developing a web application in which i am using data Access
Application Block for data access.
I have a remote web n data server with asp.net 1.1 support
the application is working fine here on the local server(web & data).
when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was
[vbcol=seagreen]
ex.Source was
.........Microsoft.Practices.EnterpriseLibrary.Data
ex.trace was
at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFai
ledEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentati
onFacade.ConnectionFailed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandW
rapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening.........
Mukesh Kumar agarwal
Delhi
IndiaMukesh,
Are you sure that the user that ASP.NET is running under has access to
the database you are trying to reach? It seems as if this is an error on
connecting.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:u6JBICB1GHA.4264@.TK2MSFTNGP05.phx.gbl...
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> ex.Source was
> .........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionF
ailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumenta
tionFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBComman
dWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.
HTH
Ciaran O'Donnell
"Mukesh" wrote:

> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> ex.Source was
> ..........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionF
ailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumenta
tionFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBComman
dWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>

Data Acess aplication block

Hi
I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.
I am developing a web application in which i am using data Access
Application Block for data access.
I have a remote web n data server with asp.net 1.1 support
the application is working fine here on the local server(web & data).
when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was
>>The type initializer for
>>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
>>threw an exception.
ex.Source was
.........Microsoft.Practices.EnterpriseLibrary.Data
ex.trace was
at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening.........
Mukesh Kumar agarwal
Delhi
IndiaMukesh,
Are you sure that the user that ASP.NET is running under has access to
the database you are trying to reach? It seems as if this is an error on
connecting.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Mukesh" <efextra@.newsgroups.nospam> wrote in message
news:u6JBICB1GHA.4264@.TK2MSFTNGP05.phx.gbl...
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> ex.Source was
> .........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.
HTH
Ciaran O'Donnell
"Mukesh" wrote:
> Hi
> I have Microsoft Enterprise Library 2005 installed on my local system.
> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
> Server 2000.
> I am developing a web application in which i am using data Access
> Application Block for data access.
> I have a remote web n data server with asp.net 1.1 support
> the application is working fine here on the local server(web & data).
> when i change the data server path to the remote server it also working
> fine but
> When I uploaded the application on the remote server n tested there it
> gives me the following err
>
> ex.message was
>
> >>The type initializer for
> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
> >>threw an exception.
> ex.Source was
> ..........Microsoft.Practices.EnterpriseLibrary.Data
> ex.trace was
> at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
> connectionString) at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>
> Plz help me why this is happening.........
> Mukesh Kumar agarwal
> Delhi
> India
>
>
>|||Hi all
As per my earlier conversation with Ciaran (thx for reply) I have
installed the MS APplication block on the server , when i ran Build
Enterprise Library file and Install Services from (batch files )
programme files menu it was asking for visual studio 2003 , I have only
.net framework on the server how can i use the MS application block
data access library on my server plz help...
Mukesh Agarwal
mukesh.nitb@.gmail.com
Delhi India
Ciaran O''Donnell wrote:
> The error you are getting is because the enterprise library wants to write
> events to the event log and setting this up requires registry permissions.
> You need to installutil the dlls for the enterprise library (this is covered
> in the docs somewhere). The reason it is writing to the event log is because
> the connection failed. If you setup the event log access correctly then you
> will have an eventlog entry telling you why the connection failed.
> HTH
> Ciaran O'Donnell
> "Mukesh" wrote:
>> Hi
>> I have Microsoft Enterprise Library 2005 installed on my local system.
>> I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
>> Server 2000.
>> I am developing a web application in which i am using data Access
>> Application Block for data access.
>> I have a remote web n data server with asp.net 1.1 support
>> the application is working fine here on the local server(web & data).
>> when i change the data server path to the remote server it also working
>> fine but
>> When I uploaded the application on the remote server n tested there it
>> gives me the following err
>>
>> ex.message was
>>
>> >>The type initializer for
>> >>"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
>> >>threw an exception.
>> ex.Source was
>> ..........Microsoft.Practices.EnterpriseLibrary.Data
>> ex.trace was
>> at
>> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent.Fire(String
>> connectionString) at
>> Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataInstrumentationFacade.ConnectionFailed(String
>> connectionString) at
>> Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection() at
>> Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrapper
>> command) at property.m4.Button2_Click(Object sender, EventArgs e)
>>
>> Plz help me why this is happening.........
>> Mukesh Kumar agarwal
>> Delhi
>> India
>>
>>
>>|||Hello Mukesh,
As for the installation of instrumentation servcie of enterprise library
2005, I've posted some information from the enterprise lib's product
team(in your another duplicated thread in the
microsoft.public.dotnet.languages.csharp newsgroup) which include:
** how disable instrumentation of enterprise library (through custom build)
when deploy them to product environment.
** how to install the instrumentation services without vs 2003
installed(use the installUtil.exe in .net framework utilities):
For your convenience, I've pasted my reply in that thread below:
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
=============================================Hi Mukesh,
As for the Enterprise Library(2005) for .net framework 1.1, the
instrumentation services does need to be installed separately. And the
"install services" bat file does require the VS 2003 IDE installed on the
machine. Actually this is because instrumetation feature is mainly used in
development environment. For production environment, generally we do not
use them and can disable the setting at compilation time(through some build
flags).
Therefore, for your scenario, you can consider the following options:
1. Build a product version of the enterprise library which disable the
instrumentation in the build options(some conditional compile variables).
2. Instead of using the "Install Services" bat file, use the
InstallUtil.exe utility(shipped with .net framework 1.1 rather than vs
2003) to register the instrumentation service against each enterprise
library assembly (you will use in your application).
Here is a blog article from the product manager of enterprise library
(pattern&practice team) which has provide a complete description on the
instrumentation services of Enterprise library 2005(.net 1.1) and how to
disable it in custom build or install the service without VS 2003 IDE:
#Instrumentation in Enterprise Library
http://blogs.msdn.com/tomholl/archive/2005/02/18/376187.aspx
Hope this helps.
Sincerely,
Steven Cheng
===============================================================

data access from sql 2005

i am using asp.net with sql 2005.

here i am having lakhs of records .

when we retrive the records it became very slow. it takes long time to retrive the datas from sql.

i used index,stored procedure,but no use. Any one know how to access the datas in fast manner.

First question would be have you tried executing the stored procedure directly from SQL Query Analyser / Management Studio? This is to determine whether it is a database issue or application issue?

If this is a database issue then you will have to look into appropriate column indexing, minimising table joins, optimise the query execution plan

If it points to an application issue, then make sure you are disposing connection objects, use appropriate command objects like readers and adapters, only fetch data you need, consider caching if the data is static in nature

Friday, February 24, 2012

Damaged PDF files

Hi,
I have created a web application with ASP.Net 2.0. I also have created a
report using Reporting Services 2005. After showing the report on the
screen, I give the suer the possibility to export to report. One of the
possibilities is PDF. Now we have some troubles with this export.
On some PC's after saving or opening the PDF we got the message :
"There was an error opening this document. The file is damaged and could
not be repaired"
It only appears on some PC's, on other PC's exporting the same documents
works fine. It also didn't have any effect on the version of Acrobat. The
problems comes with Acro v 5, 7 and 8. Even after upgrading, deinstalling,
rebooting, installing a newer version the problem still exists on those PC's.
So I hope that someone have a solution for this as we don't know if it's a
problem with reporting services or with acrobat.
Txs in advance.On Apr 30, 4:36 am, Cipidos <Cipi...@.discussions.microsoft.com> wrote:
> Hi,
> I have created a web application with ASP.Net 2.0. I also have created a
> report using Reporting Services 2005. After showing the report on the
> screen, I give the suer the possibility to export to report. One of the
> possibilities is PDF. Now we have some troubles with this export.
> On some PC's after saving or opening the PDF we got the message :
> "There was an error opening this document. The file is damaged and could
> not be repaired"
> It only appears on some PC's, on other PC's exporting the same documents
> works fine. It also didn't have any effect on the version of Acrobat. The
> problems comes with Acro v 5, 7 and 8. Even after upgrading, deinstalling,
> rebooting, installing a newer version the problem still exists on those PC's.
> So I hope that someone have a solution for this as we don't know if it's a
> problem with reporting services or with acrobat.
> Txs in advance.
I've never seen this occur before; however, from what you are saying,
it seems that it is a non-Reporting Services issue. Traditionally, if
it was SSRS, then all of the machines would be behaving the same way.
It may not be related to Acrobat either; however, I'm not sure what
could be causing the problem (missing Adobe update, missing MS Office
update, etc). Sorry that I could not be of further assistance.
Regards,
Enrique Martinez
Sr. Software Consultant

Friday, February 17, 2012

DAAB ( sqlhelper ) Problem

Hi,

i am using sql 2000 and VS2005 ASP.NET 2.0

i have a problem using sqlhelper although i didn't notice it before (i've use it a lot)

the problem summarize as increasing of the connection (mayb 50+ for one user) which results in an pool size "Overflow"

i navigated the net i found many people speaking of an alternative from microsoft.

- i would like to know more information about the problem and

- is it the best alternative or not?

- and what is the best alternative?

thanx in advance

i would be pleased if you provide me with information

When using the DAAB to create datareaders, the default behavior is that the DAAB will create the connection from a connectionsting and when you have fully iterated over the datareader, the connection will automatically close. this occurs because the daab uses the commandbehavior of: CloseConnection

http://msdn2.microsoft.com/en-us/library/system.data.commandbehavior.aspx

Since you're leaking connections, you must be doing something to open these connections yourself and you will need to make sure that you close the connections when you are done with them.

TheEnterprise Library supercedes the DAAB, but switching to it will likely not solve your problem as you have a connection leak somewhere that you will really need to find in your code.

cyrstal report into asp

Hello friends,
I am a newbie in crystal report - working on 9.2 version i have created a report and would like to view the same in an asp page -
Please if anybody can help me out with this - wanted steps to acheive the same
Thanks in advance
sandyGive a look to -->
http://www.thinkydink.com/crystal.html
This tutorial assumes you already know how to code in ASP and your Crystal and IIS servers are already set up and fully functional.

Cyrstal Report and ASP- HEEEEELLLP!

Hello:

I am using ASP and Crystal report. I created a .rpt file on a dev server and I can access the report in pdf format using ASP.

But now I want to implement the same on production server. I copied the .rpt file and changed the database settings. The preview pane shows the new data. But when I call the report from ASP and convert it to pdf I get nothing. Just the report heading and no rows get selected.

I know there is data in the database, and I confirm that the db connection is ok.

Any clues?

Also why do we specify the
Set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo CStr(databaseServer), CStr(databaseTables), CStr(databaseUser), CStr(databasePassword)

in the ASP, when we have to specify the same credentials in the rpt file as well?

Is is adviced to save the report with data or without?

Your help will be greatly appreciated.
ThanksThe report is not to be saved with that data.If u save the report with the data the data will be not be refreshed each time while opening the report.

Set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo CStr(databaseServer), CStr(databaseTables), CStr(databaseUser), CStr(databasePassword)

These lines are written so that the report can log on to the data server.|||Hi

Iam going to include a crpt report in our existing asp application.
I dont have any idea to code for how to call and use crpt in asp file.

Pls, any one give me sample codings for the same.
mail id saravanakumar77@.yahoo.com

regards
Saravanakumar.D