Link to home
Start Free TrialLog in
Avatar of dtscherne
dtscherne

asked on

Import text file using ASP.NET without Bulk Insert Permission

I need to insert a text file from a web site using ASP.NET into a MSSQL 2005 table. The problem is that the website is on a shared host, and they will not give Bulk Insert Permission. Any suggestions?
SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dtscherne
dtscherne

ASKER

I have INSERT permission but not ADMINISTER BULK OPERATIONS permissions. Also the web server and the SQL server are not on the same domain. So, SQL cannot find the file on the Web server. Any other suggestions? I was wondering if it is possible to have ASP.NET parse the file and load it directly without BULK INSERT.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I can FTP the file to the web server, but the SQL server is on a different domain and cannot see the web server. I was hoping for a better option than parsing the file with ASP.NET and inserting into SQL row by row. The file will change depending on the user. It could range from 10K rows to 1000K rows. My prefered solution would be to do a Bulk Insert, but the web host won't allow it. Does anyone know of a web host who allows Bulk Insert?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Mark for clarifying your answer. The website and database are on a shared hosting environment, but they are on different domains. So I don't have much control. The text files will only change in length, not in layout, so that is good. The problem with using Bulk Insert is that it is a server permission. So whatever they set up for me affects everyone on the server. Convincing the host to let me have a staging area means that they would have to set up a staging server. In other words, any solution that requires bulk insert is out.

Do you know if there is a way to load the file into a BLOB and then parse it into a table?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

dtscherne,
please review the link below about what is C grade
https://www.experts-exchange.com/help.jsp#hi97

C: Because Experts' reliability is often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.
D: This grade can only be given by Moderators and Zone Advisors.
Remember, the Experts helping you today are probably going to be helping you next time you post a question. Give them a fair chance to earn an 'Excellent!' grade and they'll provide you with some amazing support. It's also true that a "C" is the lowest grade you can give, and the Experts know that -- so use it judiciously.