-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Ambitious_Riddhi
Message 1 in Discussion
Hi All, I am new to this group. I am currently working with VB.NET.
My problem is when i am trying to execute bcp utility from VB.net thru
System.Diagnostics.process.start(), It is giving me exception like : "Access is
Denied." Whole description of Exception is as follows.
{System.ComponentModel.Win32Exception}
[System.ComponentModel.Win32Exception]:
{System.ComponentModel.Win32Exception}
HelpLink: Nothing
InnerException: Nothing
Message: "Access is denied"
Source: "System"
StackTrace: " at
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Common_Sol.CE.Button3_Click(Object sender, EventArgs e) in
D:\Data_Estimates\Common_Sol\Common_Sol\CE.vb:line 1079"
TargetSite: {System.Reflection.RuntimeMethodInfo}
My code is as follows. Dim myProcess as new
System.Diagnostics.Process cmdString = "Select
ch8401,ch8402,ch7803,ch5601 from tab1,tab2,tab_master where tab_master.code =
tab1.code and tab_master.code = tab2.Code into #temptable"
myProcess.StartInfo.FileName = "D:\bcp.bat"
myProcess.StartInfo.Arguments = " " & cmdString & "
D:\Data_Estimates\CE\CE_NATION1984-2003.txt" myProcess.Start()
Actually cmdString contains too much long queries. I am extracting data from
sql server into textfile using bcp utility. I need to extract data from more
than 10 tables and it contains around 900 columns. All columns must be extrcted
at same time and only in one text file. Code is bcp.bat file is like :
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\bcp" %1 out %2 -c -t ","
-r "\n" -P Also without batch file it is giving err : "The
specified is not found." The same command works succesfully from
command line. So what is the problem with VB.NET? Plz reply me soon.
Thanks for all replies in Advance. Riddhi
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]