Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,730 of 19,505    |
|    Bob Barrows to Erland Sommarskog    |
|    Re: Escape Characters in Strings    |
|    24 Aug 12 06:16:04    |
      From: reb01501@NOSPAMyahoo.com              Erland Sommarskog wrote:       > Bob Barrows (reb01501@NOSPAMyahoo.com) writes:       >> Under the covers, a command object is created (similarly as to when       >> the connection's Execute method is called) and parameter objects are       >> appended, typed based on that "best guess", which uses the types (or       >> subtypes given vbscript's restriction to Variant datatypes) of the       >> passed values in making that guess. Yes, theoretically, the best       >> guess could be wrong, but in my experience it never has been - at       >> worst, an implicit conversion might be required. Of course, my       >> environment has always been very simple. And as long as you properly       >> type your VB objects, the chance of a bad guess that requires more       >> than a conversion from varchar to nvarchar, or float to integer is       >> slim.       >       > The area that would make me the most worried are dates, particularly       > if you have them in string fields. If they are passed as (n)varchar,       > conversion happens in SQL Server which can give a headache.              Right. They need to be passed as dates, either as the result of using       CDate() or Dateserial() or literal dates (delimited with hash marks in       vb/vbscript).              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca