Re: Anger, Rage, Confusion...

From: Fabio (user_at_domain.invalid)
Date: 01/30/05


Date: Sun, 30 Jan 2005 11:53:07 +0000

Hey Roy,

> Hrmm.... Could it have something to do with my x and y variables being
> declared in the vb code as strings yet the parameters are declared as
> nvarchar?

You can use an overload of the SqlParameter constructor that takes also the size
of the field and the source column, eg New SqlParameter("@x",
SqlDbType.nvarchar, 50, "sourcecolumn"). That would solve that.

> I know for a fact that the x and y variables have the correct values,
> but if they weren't reaching the stored proc somehow that could explain
> the blank datagrid...

Silly question, but I have to ask: are you sure that the sproc is returning
exactly the data you want? Have you run it in query analyzer at *all*?

-- 
Software is like sex: it's better when it's free -- [Linus Torvalds]
Fabio Marini - A+, RHCT, MCDBA, MCAD.NET
To reply: news [at] mamakin1976 [dot] plus [dot] com


Relevant Pages

  • Re: stored procedure question
    ... > I pass a stored procedure 2 strings: ... but it is looking for StringVal to be an INT ... > @StringVal1 nvarchar, ... > declare @NextString1 nvarchar ...
    (microsoft.public.sqlserver.programming)
  • Re: Overloading problem
    ... >>why can't I overload these procedures? ... > Private Sub proc) ... second version expects a list of strings. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Convert to DateTime
    ... A straightforward way is to add a new datetime column to the table, ... and run a succession of update queries from the old nvarchar to the new. ... there are still strings that will convert to date and time ...
    (microsoft.public.sqlserver.programming)
  • Need VC6 workaround for function template
    ... I have created a function template that splits a string into a vector of tokens. ... To make it easy to use I overloaded it for strings so that it then looks like a regular function. ... So, if the tokens are to be split into strings, not template parameter is needed. ... The problem is that the code compiles with VC7.1 but not VC6.0, where the compiler complains of ambiguous overload. ...
    (microsoft.public.vc.language)
  • Re: Microsoft SQLServer - varchar or nvarchar fields?
    ... I'm tempted to use nvarchar (because jtds driver seems to send strings as ...
    (comp.lang.java.databases)