Re: DataAdapters and Parameters

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> Does a parameterized DataAdapter automatically take care of this so I can
> use the following SQL without having to worry about blank textboxes?:

No. Your DataAdapter will work exactly per the SQL Statement you specify.

> Perhaps a DataReader is more appropriate for this?

I don't see why .. this factor is certainly not a consideration in choosing
between dataadapter or datareader.

> Presently, in my Access application, I've had to write a separate strSQL
> for
> each possible combination as to avoid creating a SQL statement with a
> blank
> parameter.

So you are using MS-Access? Try Like %xx%

> Additionally, since this will be an Intranet application which needs
> downtime backup, that is why I am currently working with Access. I'm
> hoping
> for the user to use SQL server while the intranet is up, and have a
> downtime
> backup of this info in an MDB file on their local hard drive.

I'm so confused. If this is an ASP.NET App, you shoudln't be using Access,
and if there is downtime - then the webserver is down - why bother with MS
Access?

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________


"jonefer" <jonefer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:279689B7-9035-40B6-AE7D-649FE62446DD@xxxxxxxxxxxxxxxx
> I'm creating a simple search for Members, with possible 4 search
> parameters:
> Name, SSN, DOB, SEX, but (just beginning ASP.NET/VB.NET) I'm fearing that
> I
> will need to create a dataadapter for every possible combination of fields
> entered to eliminate a blank parameter.
>
> Does a parameterized DataAdapter automatically take care of this so I can
> use the following SQL without having to worry about blank textboxes?:
>
> SELECT * From Membership WHERE
> Name = @txtName AND
> SSN like @txtSSN AND
> DOB like @txtDOB AND
> SEX like @txtDOB
>
> Perhaps a DataReader is more appropriate for this?
>
> Presently, in my Access application, I've had to write a separate strSQL
> for
> each possible combination as to avoid creating a SQL statement with a
> blank
> parameter.
>
> Additionally, since this will be an Intranet application which needs
> downtime backup, that is why I am currently working with Access. I'm
> hoping
> for the user to use SQL server while the intranet is up, and have a
> downtime
> backup of this info in an MDB file on their local hard drive.
>
> Thanks so much for anything to help with this...
>


.



Relevant Pages

  • Re: DataAdapters and Parameters
    ... so I'm assuming that this is a client server app based on the intranet ... downtime needs to be considered. ... using SQL Server and ASP.NET via our intranet. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: DataAdapters and Parameters
    ... server goes down and we need to check a customer's membership. ... using SQL Server and ASP.NET via our intranet. ... I guess I could go with a synchronized SQL database?... ... >> downtime backup, that is why I am currently working with Access. ...
    (microsoft.public.dotnet.framework.adonet)
  • Time of failover of Microsoft SQL 2000
    ... I have recently setup an active-active Microsoft SQL 2000 cluster on ... moves for a total of 6 min downtime minimum, ...
    (microsoft.public.sqlserver.clustering)
  • Re: Problem after 49.71 Days
    ... Andrew J. Kelly SQL MVP ... >> Are you running the latest service pack for SQL 7 and the OS? ... > returns 7.00.961 which I believe is SP3/3a for SQL Server. ... > convince the 'powers that be' to allow some downtime. ...
    (microsoft.public.sqlserver.server)
  • Running ComClust.exe after SQL 2000 installed on Win 2K cluster
    ... Are there any issues or downtime when running ComClust.exe ... on a cluster after SQL 2K has been installed? ... Thanks, John ...
    (microsoft.public.sqlserver.clustering)