Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Data Access Aplication Block and Access database

Reply
Thread Tools

Data Access Aplication Block and Access database

 
 
Fernando Lopes
Guest
Posts: n/a
 
      03-29-2005
Hi there.
I'm using the DAAB in my app.
So, if I need to fill a dataset, using a SQL Server database, I use the
following code

helper.FillDataset(conn, "GetCustomersByID", ds, new string[] {
"Customers" }, new string[] { "ALFKI" });

Parameters:
conn = Connection
GetCustomersById = stored procedure name
ds = the dataset for fill
new string[] {"Customers"} = the table name
new string[] {"ALFKI"} = the id parameter for stored procesure search.

If I want to use Access database, how can I will do?
I will need to put if's in everywhere, like:

if (SqlServer)
helper.FillDataset(cs, "GetCustomersByID", ds, new string[] {
"Customers" }, new string[] { "ALFKI" });
if (Access)
helper.FillDataset(cs, CommandType.Text, "SELECT * FROM Customers WHERE
CustomerID = 'ALFKI'", ds, new string[] { "Customers" });


It seems insane for me!

Someone has another idea or got the same problem?

Tks.

Fernando


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Fo:Block can you check to see if a block contains any text by using the block id? morrell XML 1 10-10-2006 07:18 PM
Data Acess aplication block __How to use it on server without MicrosoftVisual Studio 2003 Mukesh ASP .Net 3 09-11-2006 01:50 PM
Data Acess aplication block Mukesh ASP .Net 1 09-09-2006 02:41 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57