Re: VBA - Create a recordset with no records for inserting
- From: INTP56 <INTP56@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Oct 2007 13:06:00 -0700
"Bob Barrows [MVP]" wrote:
What about putting the data into a text file and using BULK INSERT (look
it up in BOL) to bring it into sql?
Actually, that is what I will be doing.
The issue I was trying to get around was integrated security. If I log
directly into the server, I can run a PROC that gets files from my desktop.
But if I log into my desktop, I get back an error talking about NULL logins,
and the network people here tell me it's related to security ... I can't log
into my box and run a PROC on the server that comes back to my box; my
credentials won't make the last jump.
I know I can make an invisible share on my database server, that way I know
the BULK INSERT command will be able to get to the file. Excel will call a
PROC that writes a row into a FileImport table, then push the ID of the row
into a queue the ServiceBroker will manage, then return immediately to Excel.
The ServiceBroker will construct the dynamic SQL statement to BULK INSERT the
file (Because the file name has to be a string, it can't be an expression).
But the file needs to be on the database box.
I thought I could use ADO to move the data into my BULK INSERT table so I
wouldn't have to make that FileShare on my server box. Since I own this box,
I can do that ... but if and when this database moves to a box I don't own,
this could be a problem.
Either way, the file is now in my BULK INSERT table. I call the lookup &
complex validate PROCs, and if all that is OK, move the data into the "real"
tables
Bob
.
- References:
- Re: VBA - Create a recordset with no records for inserting
- From: Bob Barrows [MVP]
- Re: VBA - Create a recordset with no records for inserting
- From: INTP56
- Re: VBA - Create a recordset with no records for inserting
- From: Bob Barrows [MVP]
- Re: VBA - Create a recordset with no records for inserting
- Prev by Date: Re: What could be the problem with this INSERT with ADO parameters?
- Next by Date: Re: What could be the problem with this INSERT with ADO parameters?
- Previous by thread: Re: VBA - Create a recordset with no records for inserting
- Next by thread: What could be the problem with this INSERT with ADO parameters?
- Index(es):
Relevant Pages
|