View VS Store Procedure in ADO 2.5

Hi, I have to convert an DAO 3.5 access vb program to a ADO 2.5 SQL Server 2000

I have grids that displays 2000 records... What is the fastest SQL Server access method
in ADO to return rows is it Store Proc Or Views ???
(My Data doesn't need to be change only viewed)
How do we call a view in ADO?
Also is my connection string good or is there a faster connection that exist
I know that ODBC Is slow because of multiple layers so I use that one.
(BTW I have a lot of vb experience but no experience in SQL server)
Is it a good thing to open a connection only when the program starts
and close it when the program close???
StrSqlSrv = "Provider=SQLOLEDB.1;Integrated Security=SSPI;" & _
"Persist Security Info=False;Initial Catalog=testdb;" & _
"Data Source=" & servername
8/6/2003 8:53:21 PM 29906 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 59

I would suggest a Stored Procedure over a view.  The database should be able to generate a more efficient execution plan that way.  You can tell for sure by using SQL Query Analyzer for each way and comparing the execution plans.

You can call a view just like you would a table.
The connection string is good.
It's best to open a connection just before you want to get the data and close it immediately after. Opening and closing connections is much more efficient than in the old days so there's little overhead associated with opening and closing. Keeping connections open for the minimum amount of time allows the connection pool manager to operate more efficiently. But if a procedure needs to make more than one database call, then it's ok to open before the first and close after the last it done.
8/6/2003 9:25:42 PM

Similar Artilces:

executing Proc's PB6.5 -Stored Procedures 11.02 vs Stored Procedures 11.9.2
Hi all, I had Migrated the database from 11.0.2 to 11.9.2. Powerbuilder is not executing certain procedures called from event. But when a code of Sqlca.Autocommit = True is added before calling the Procedure it works.Anybody has any idea thanx to all ram Could it be that the 2 databases are configured differently with respect to chained mode, for example? Do your sp's attempt to create temp tables or perform any other DDL? steve [TeamSybase] ram wrote: > > Hi all, > I had Migrated the database from 11.0.2 to 11.9.2. Powerbuilder is > not execut...

ADO.NET 2.0 - Three-tier application - connection string error
Using ASP.NET 2.0 beta, VS2005 beta 1, W2k3 server with IIS I try to build a three-tier app structure as followed: - the store procedure in SQL with a input parameter as Username and retrieve the UserId as output parameter. - the business logic (class) with connection string defined in web.config (“AppConnectionStringASPNETapp”) - the presentation aspx file after the user has logged in through login.aspx I have work out 2 scenarios with 2 different errors. Scenario 1: Here is the code is business logic (class) (catalog.cs) using System; using System.Data; usi... dataset with 2 datatable store it into 1 stored procedure
Hi, i have 1 dataset which have 2 dataTable contain; dataTable 1: FieldName : firstname lastname jobtitle company mobiletelephone contact_Id Value: Barns Happy Executive Unigi 32123 0 dataTable2: Fieldname :address street city zipcode country telephone fax contact_Id 44Dover Dover Sg 12345 Singapore 2331 12313 0 I m trying to put the whole dataset into 1 stored procedure here's my code Public Function update(ByVal ds As DataSet) As B...

PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES
PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES - ADO.NET TO ORACLE FUNCTION   I have a very simple oracle function I'm trying to call from The code works fine for a stored procedure but I get the error  PLS-00221: is not a procedure or is undefined  when I try to call the function. here's my code:  I've manually tested both the function and stored procedure and they are both working as expected.  here's my code Protected Overrides Sub OnLoad(ByVal e As EventArgs) Dim cnn As OracleConnection Dim sConnSt...

Stored Procedure vs. SQL As Datasource
Hi all. Just a quick question about some behaviours I am seeing with a datawindow I've developed. I was handed an existing report for an application and asked to make it more efficient and run faster. The existing report is an external that derives its data from a SQL Server 7 stored procedure and it ran like a pig. The stored procedure creates a temp table, selects data into it, and then supplies that data to the external. Not being a huge fan of stored procedures to begin with, I rewrote the SQL for the report's data just as a SQL Select in a freeform dw and now the ...

Stored Procedures vs Dynamic SQL #2
I am currently writing a web based transaction query system. The querys that the applkication is required to support are very flexible. The rpoblem i have at the moment is that all the database access is done via stored procedures, these procedures are all very simlair in content with only really the SELECT and GROUP BY clauses being changed per procedure. The issue this is leading to is maintenace is a nightmare as if an issue is found then currently it could need changed in up to 500 places, this as you can imagine becomes a laborious and error prone task. I am looking for suggestion...

Using ADO.NET Execute Second Stored Procedure Depending of Output of First Stored Procedure
When a user logs onto the app, I capture their UserId, today's date and thier WINNT using ADO.NET calling a stored procedue-no problem. Now, once the above mention fields have been populated, when the same user logs on again and this time click their daily attendance time, I need to execute and update stored procedure-no problem. Each time the user logs onto the attendance page, they need to be able to view the previuos time stamps, on page load.- no problem The problem is that I cannot get all three to work in concert, although they will work independently, somewhat. Sotred proc...

stored procedure as datasource for datawindow (MS SQL vs. Oracle)
Hi, I used to prepare stored procedure (in MS SQL Server) as data source for every datawindow like: create sp_... .... begin ... select col_01, col_02, ... from ... where ... ... end I need to implement the same in Oracle EE 7.3. But it is not even possible to compile such code in PL/SQL stored procedure (error says there has to be an into clause). So the question: can PL/SQL stored procedure be datasource for datawindow in PB? If so, what syntax. Thanks for any help. Martin Helmich, Empire s.r.o. ...

Support for dw.NET 2.5 in VS 2008, .NET framework 3.5 and Oracle 10.2g
Hi, I intend to use the datawindow.NET 2.5 in VS 2008 (.NET framework 3.5) using a Oracle 10.2g database as a backend and later using Oracle 11g as backend. Can someone please let me know if the product is supported in the environments mentioned. All help will be highly appreciated and many thanks in advance. Regards Hasan Kasamali On Nov 24, 3:06=A0am, Hasan Kasamali wrote: > Hi, > > I intend to use the datawindow.NET 2.5 in VS 2008 (.NET > framework 3.5) using a Oracle 10.2g database as a backend > and later using Oracle 11g as backend. > > Can ...

A bug?: 2.0, sql 2000, vs 2005
I wonder if there is a bug in the VS 2005 with respect to using ADO.NET 2.0 and SQL Server 2000. I have already posted about this matter in the SQL 2005 forum, but I wonder if this is a fault to do with VS 2005 as VS 2003 doesn't do what I am noticing.1. Debugger: Before I step through code, it has already executed.2. Transactions: Committ() is still run, table permissions set or not. It doesn't run if I have a T-SQL statement that refers to a non existent table.Although an old post, on MS's bug reporting site there seems to be a similar issue:

how to pass 2 dimensional array to a sql stored procedure
I am developing a online shoing cart for a ISP company. according to the business when we add some products we keep set of records for products such as domain name, address , tel, hosting option and so on so my basket contains a list of items as follow i would prefer to convert these in to datatable and pass to a stored procedure item     tel           name        add1      add2       add3      postcode   &n...

ADO.NET, GUID and ASA Stored Procedure...
Hello All, I am having issues... I have two tables The First is Category. Category Has Two Fields Category_ID type uniqueidentifier and Name type varchar(30) The second table is Value. It has three fields Value_ID type uniqueidentifier, Category_ID type uniqueidentifier and Name type varchar(30) I am connecting to the first table using ASADataReader with a simple select * from category. (there is only one record). I am filling a variable named _id type GUID with dr["Category_ID"]. The variable is populated and life to this point is good. Here is the st...

PB 6.5.1 Vs MS Sql 7.0
I am using PB 6.5.1 / MS Sqlserver 7.0. Datawindows with select statements work fine, but For all the Datawindows with Stored procedures as the Data source, I'm getting the following error while trying to run or preview - Select error: SQLSTATE=22005 [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification What could be the problem ? Please help. Thanks a lot !! Although, I upgraded this app from PB 4.0 to 6.5, Even If I try to create a new datawindow with any stored procedure, I get the same error. I'm using ODBC MDAC 2.1 to access the database...

VS.NET 2005 vs VS.NET 2003 #2
why there is no datagrid anymore when i drag the tables in design view? it's the gridview,and where is the data adapter. How will i connect the tables now? Here are a couple videos on the new Data model in VS2005.  I think you will find it much easier to use.  I have watch the first one, but the second is by Fritz Onion.  I think there is an Advanced Data Binding Video in the same series done by him as well. ASP.NET HOW DO I Video Series: Data MSDN Webcast: Essential ASP.NET for the Web Developer (Part 5 of 15): Introduction to Data Binding (Level 200) Hope this helpsTh...

Web resources about - View VS Store Procedure in ADO 2.5 -

Invasiveness of surgical procedures - Wikipedia, the free encyclopedia
There are three main categories which describe the invasiveness of surgical procedures . These are: non-invasive procedures , minimally invasive ...

Procedure is more a snap than a snip
A QUEENSLAND doctor is bidding to set an unusual world record by performing the highest number of vasectomies in one day, with the help of fellow ...

Rushed cosmetic procedures a 'recipe for disaster'
​When Chanelle O'Hare went searching online for a deal on potential cosmetic procedures, she could not have imagined that what she ended ...

Jetstar procedures under investigation after planes took off too heavy
Jetstar's procedures for calculating the weight of its aircraft are under review by the Australian Transport Safety Bureau after two of its planes ...

NFL Announces Changes to Officiating Procedures for Playoffs - Bleacher Report
The NFL formally approved changes to its postseason officiating procedures to allow referees the opportunity to consult Vice President of Officiating ...

Will Paul Ryan Make His Mark As Speaker By Instituting Impeachment Procedures Against President Obama ...
Wisconsin Ayn Rand devotee Paul Ryan just started his new job as Speaker of the dysfunctional House Republicans. And he's already headed for ...

NFL security procedures in question after rappelling protesters
Two protesters with sophisticated gear disrupted the Panthers-Colts game in Charlotte Monday night, bringing into question security at the stadium ...

'Painless' dental cavity procedure regrows tooth enamel
... "cavity" a lot of people sweat thinking about painful injections and relentless drilling. But scientists in Britain have developed a new procedure ...

'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure
'Daily Show' Host Trevor Noah Hospitalized for Emergency Procedure

Why Are Web Login Security Procedures So #$*&!% Dumb And Obnoxious?
The geeks who design our websites talk a lot about user friendliness, but they often let an exaggerated security concerns get in the way of commonsense. ...

Resources last updated: 12/20/2015 12:06:01 PM