Re: How to look at parameter string

Tech-Archive recommends: Fix windows errors by optimizing your registry



Well, you certainly didn't give us much to work with here, but I'll give her
a shot.

First of all, try this:
objCmd.parameters.add("@ClientID",SqlDbType.VarChar,20).value =
session("ClientID").ToString()

Also, you might want to consider instrumenting your code as to allow you to
write out trace and debug information. That would help you run down the
source of the problem.

Otherwise, post your exact error messages and code snippets and we'll try to
help as best we can.

Dave

"tshad" <tscheiderich@xxxxxxxxxxxxxxx> wrote in message
news:Op3bAdFQFHA.1528@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not sure if this is an asp.net or ado.net question.
>
> I have been using parameters with my Sql commands and have been getting
> errors that say there is a problem with my input string, but there is no
way
> to look at what it is trying to do.
>
> I have many parameters such as:
>
> objCmd.parameters.add("@ClientID",SqldbType.VarChar,20).value =
> session("ClientID")
> objCmd.parameters.add("@Email",SqlDbType.VarChar).value =
session("Email")
> objCmd.parameters.add("@SearchName",SqlDbType.VarChar,45).value =
> SearchName.Text
>
> But there doesn't seem to be a way to look at the @Client or @Email type
of
> variables to see what it is trying to put together.
>
> I get the error when I try to do a:
>
> Dim applicantReader = objCmd.ExecuteReader
>
> The problem is not coming from Sql Server but from my page. If there was
a
> problem with the string being sent to SQL Server, it would show up in the
> Sql Profiler - which is how I usually find the parameter problems.
>
> In this case, it is never getting sent. Is there some way to see what
> ASP.Net is trying to send?
>
> Thanks,
>
> tom
>
>


.



Relevant Pages

  • Re: Limiting DTS job runtimes
    ... >Is there way to limit the runtime of a single job, ... >Can someone perhap provide some code snippets on how to ... what I term my Job Monitor system here- ... global community for SQL Server professionals ...
    (microsoft.public.sqlserver.dts)
  • Re: Using simple Stored Procedure in ASP.NET
    ... before you connect to SQL Server. ... Is there suppose to be a exec ProcGetPhone somewhere in TextData? ... >>> Input string was not in a correct format. ...
    (microsoft.public.sqlserver.programming)
  • RE: Using Web Data Administrator and cant log on.
    ... I donot have more information on the authentication mechanism that it uses ... to connect to the SQL Server. ... But you can give it a shot by setting it up for clear text user account and ...
    (microsoft.public.sqlserver.msde)
  • Network Admins vs. Sql Progammers
    ... I'll give it a shot. ... scuffle between Network Admins and SQL Programmers. ... network admins refuse to give it to them stating they don't need it. ... programmers need on the SQL server? ...
    (microsoft.public.sqlserver)