SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot manic's Avatar
    Join Date
    Dec 2001
    Location
    uk
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sql server datatype

    I just stumbled into something which kinda of makes sense but I'm not 100% sure about... hope one of you can help.

    I have a field as nvarchar.

    I had the sql checking it: select blar from blar where blar = 0

    weird thing is in the enterprise manager DTS the query parsed as ok. Overall the DTS failed because it came across some characters it said it couldn't handle.

    The query changed to: select blar from blar where blar = '0'

    and everything worked fine from there on.

    ---

    What I'm wondering is, can nvarchar accept numeric values as well as string values?

    if it can then the above all makes sense, if it doesn't... have I just found a bug?
    Don't you just hate it when it works first time.

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,200
    Mentioned
    105 Post(s)
    Tagged
    1 Thread(s)
    Not through ado it can't. You need to be careful and specific with datatypes when using ado.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  3. #3
    SitePoint Zealot manic's Avatar
    Join Date
    Dec 2001
    Location
    uk
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DaveMaxwell
    Not through ado it can't. You need to be careful and specific with datatypes when using ado.
    not using ado anywhere... this is all on the DTS.

    unless DTS uses ADO and I didn't know it???
    Don't you just hate it when it works first time.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •