I have the following on an asp page -

<%
Set Con=server.CreateObject("ADODB.Connection")

con.Open "DSNNAME", "USERNAME", "PASSWORD"

con.Execute "BULK INSERT tblName FROM 'C:\Inetpub\wwwroot\file.csv' WITH
(MAXERRORS = 0, FIELDTERMINATOR = '"",""', ROWTERMINATOR = '\n')"

con.close

Response.Redirect "success.asp"
%>

The script appears to run and return me to success.asp, however there is
nothing posted in the db. What am I doing wrong?

--
Olivia Towery

Re: Bulk Insert by Bob

Bob
Wed Jan 25 16:15:52 CST 2006

Olivia Towery wrote:
> I have the following on an asp page -
>
> <%
> Set Con=server.CreateObject("ADODB.Connection")
>
> con.Open "DSNNAME", "USERNAME", "PASSWORD"
>
> con.Execute "BULK INSERT tblName FROM 'C:\Inetpub\wwwroot\file.csv'
> WITH (MAXERRORS = 0, FIELDTERMINATOR = '"",""', ROWTERMINATOR = '\n')"
>
> con.close
>
> Response.Redirect "success.asp"
> %>
>
> The script appears to run and return me to success.asp, however there
> is nothing posted in the db. What am I doing wrong?
>
Is your sql server on the same box as your iis server?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: Bulk Insert by Olivia

Olivia
Wed Jan 25 16:43:06 CST 2006

Hi Bob,

Yes, it is.

Olivia

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> Is your sql server on the same box as your iis server?
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>



Re: Bulk Insert by Bob

Bob
Fri Jan 27 05:47:09 CST 2006

Olivia Towery wrote:
> I have the following on an asp page -
>
> <%
> Set Con=server.CreateObject("ADODB.Connection")
>
> con.Open "DSNNAME", "USERNAME", "PASSWORD"
>
> con.Execute "BULK INSERT tblName FROM 'C:\Inetpub\wwwroot\file.csv'
> WITH (MAXERRORS = 0, FIELDTERMINATOR = '"",""', ROWTERMINATOR = '\n')"
>
> con.close
>
> Response.Redirect "success.asp"
> %>
>
> The script appears to run and return me to success.asp, however there
> is nothing posted in the db. What am I doing wrong?

Try running that script in Query Analyzer. See if any errors or warnings are
reported.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



Re: Bulk Insert by Olivia

Olivia
Wed Feb 01 14:27:08 CST 2006

Ran Query Analyzer and message back is - (0 row(s) affected). I have given
the user bulk insert permissions. Is there any other sql server settings I
may need to look at?


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%23DrhldzIGHA.500@TK2MSFTNGP15.phx.gbl...
> Olivia Towery wrote:
> > I have the following on an asp page -
> >
> > <%
> > Set Con=server.CreateObject("ADODB.Connection")
> >
> > con.Open "DSNNAME", "USERNAME", "PASSWORD"
> >
> > con.Execute "BULK INSERT tblName FROM 'C:\Inetpub\wwwroot\file.csv'
> > WITH (MAXERRORS = 0, FIELDTERMINATOR = '"",""', ROWTERMINATOR = '\n')"
> >
> > con.close
> >
> > Response.Redirect "success.asp"
> > %>
> >
> > The script appears to run and return me to success.asp, however there
> > is nothing posted in the db. What am I doing wrong?
>
> Try running that script in Query Analyzer. See if any errors or warnings
are
> reported.
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>