Re: Simple ADO problem: SOLVED! (1 more question)

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

From: Chris R. Timmons (crtimmons_at_X_NOSPAM_Xcrtimmonsinc.com)
Date: 04/10/04


Date: Sat, 10 Apr 2004 02:22:52 -0700

Alex <a@b.c> wrote in
news:oeed70d2l9dgth5720ou9t3p7qpudrg6cn@4ax.com:

> On Fri, 09 Apr 2004 02:15:40 -0700, "Chris R. Timmons"
><crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote:
>
>>The \n is causing the error. That puts a newline in the string.
>> Either escape it (\\n), or precede the entire string with the @
>>symbol (e.g. @"Integrated Security;Persist...")
>
> Thank you very much! That's what I get for writing VB for too
> long...
>
> One more question, though. How do I get the host name without
> typing it? If I type it out, no errors, and everything performs
> as expected but if I use "Data Source=localhost" or "Data
> Source=(local)" I get the error again ("SQL Server does not
> exist or access denied.").

Alex,

I'm not sure why the "localhost" or "(local)" name won't work for
you. Here's a Google thread that seems to cover most of the possible
causes:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-
8&threadm=xUxM0SWFEHA.1988%40cpmsftngxa06.phx.gbl&rnum=51&prev=/group
s%3Fas_q%3D%2522sql%2520server%2522%2520(local%2520OR%2520localhost)%
2520connection%26safe%3Dimages%26ie%3DUTF-8%26oe%3DUTF-
8%26as_ugroup%3Dmicrosoft.*%26as_scoring%3Dd%26lr%3D%26num%3D100%26hl
%3Den

or

http://tinyurl.com/2od46

Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/



Relevant Pages

  • Re: CreateMapFile e LPCWSTR
    ... Excuse me Alex ... but i can't resize my array with the new length:(( ... > check every string when copying to the buffer. ... >>> typedef struct { ...
    (microsoft.public.pocketpc.developer)
  • Re: memcmp and memcpy in c# ?
    ... > bytearray b2 is part somewhere in b1. ... > int section_init ... where string conversation will not the best way. ... >> Alex, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: memcmp and memcpy in c# ?
    ... All I have is a bytearray b1 and I want to kow is, ... int section_init ... where string conversation will not the best way. ... Alex ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Requerying Problem
    ... Thank you Alex. ... Dim intSID As Integer, intCID As Integer, strsql As String ... Dim conn As New ADODB.Connection ...
    (microsoft.public.access.modulesdaovba)
  • RE: Selecting a range defined in a cell
    ... Private Sub CommandButton2_Click ... "Alex" wrote: ... Dim s as String ...
    (microsoft.public.excel.programming)