|
Hi.
I have a web application, which runs on the server. The application supposed to access folder on the Intranet (provided by user), grab some files and read them. The problem I have is the security. Some folders on the Intranet are not accessible. What happens is when user provides directory address to my application I cannot access the folder due to access denied error. How can I go around that? In my web.config file I have set but still it doesn't work.
Thank you,
|
|
|
|
|
I want to get data from excel file and fill data into DataTable via OLEDB. But header of DataTable is always the first row of excel file.
Exp : i have data in excel file :
John 29
Kevin 27
Kex 34
When i fill it into DataTable, header of DataTable is (John 29). And i don't want that. I want (John 29) is the first row of DataTable. So how could i solve that?
code :
Dim cnn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Info.xls;Extended Properties=""Excel 8.0;HDR=YES;""")<br />
Dim da As New OleDb.OleDbDataAdapter("Select * from [Sheet1$]", cnn)<br />
Dim dt As New DataTable("TestExcel")<br />
da.Fill(dt)
|
|
|
|
|
Make the first row in your excel document your header row.
I'm listening but I only speak GEEK.
|
|
|
|
|
Hi,
I have a piece of code which reads the contents of a cd to and image file using a DOS command line program. While this is running the main window becomes frozen. Does anyone know how I can create a thread that deals with the command line program so that the window does not freeze.
Thanks
|
|
|
|
|
Let's see the code your using to launch this command line process and interact with it. Usually, something like this doesn't block your interface, unless your doing a WaitForExit on the Process object.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
This is the code I am using to launch the command
Dim command As String
command = "C:\readcd dev=1,0,0 f=c:\johntest2.iso"
Shell(command, AppWinStyle.Hide)
I am also hoping to display a message when the command has finnished.
-- modified at 7:23 Wednesday 10th January, 2007
|
|
|
|
|
Are you using VB.NET or VB6??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sorry Dave. I am using VB.net 2003.
|
|
|
|
|
OK. The code you posted is old VB6 stuff. But, in either case, Shell isn't a blocking call, so... There's something else that's hanging up your app. Is it possible that the app you launched is taking up 100% of the CPU??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
The app probably would be using most of the cpu time. I came across the process.start which seems to help. Would this be the best thing to use.
|
|
|
|
|
Yep. Launching a new process automatically give it it's own thread. It's not dependant on the threads of your app, so launching another thread won't help.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
My textbox is bound to a datatable field. The field length is 50. I set the maxlength of the textbox to 50 also. When I run the form I cannot modify the textbox until I delete the trailing spaces. Can the trailing spaces automatically be removed so the user does not have to do it when modifing the textbox?
|
|
|
|
|
.Trim()
|
|
|
|
|
dptalt wrote: Can the trailing spaces automatically be removed so the user does not have to do it when modifing the textbox?
If you are able, you should tackle the root cause.
If you use a varchar in the database instead of a char then you won't get trailing spaces in the first place and you'll probably make more efficient use of your database.
In general you should only use char for interaction with legacy code that doesn't understand variable length columns or if you know that the data in the column will always be a fixed length.
|
|
|
|
|
|
Hi all,
Please help!
I have created a program which i am deploying with clickonce from a file share on our server,
it installed on 2 clients no problem, but on the third a got the error:
Unable to connect to the remote server
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
and on the forth machine a got the error:
Unable to connect to the remote server
No connection good be made because the target machine actively refused it
On the forth machine i copied the installation folder to the desktop and started it from there without any problem.
Any help would be greatly appriciated.
Many thanks in advance.
|
|
|
|
|
Hello,
Can anyone please help me to write code (language: any .Net platform) to append text to a WAV file?
Thank you in anticipation.
Regards,
Amit
|
|
|
|
|
Why on earth would you want to do this? I can't think of a single good reason.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I need to send these amalgamated WAV files to a third party software which expects some demographics information at the end of each WAV file.
Thank you.
|
|
|
|
|
Amit D wrote: which expects some demographics information at the end of each WAV file.
OK. There's an example of appending text to a file here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Dave for link but it wasnt helpful in this case as I know the basic file I/O all I need is to know how to write proper header information in the WAV file along with the proper byte count which includes the actual WAV file and newly appended text at the end.
Found this link: http://www.codeproject.com/useritems/Concatenation_Wave_Files.asp
But in this example the program amalgamates 2 WAV files as in my case its 1 WAV file + 1 text file = 1 WAV file with all information in it.
Many Thanks.
Amit D
|
|
|
|
|
Amit D wrote: but it wasnt helpful in this case as I know the basic file I/O all I need is to know how to write proper header information in the WAV file along with the proper byte count which includes the actual WAV file and newly appended text at the end.
That's not what you originally asked.
Amit D wrote: Found this link: http://www.codeproject.com/useritems/Concatenation_Wave_Files.asp
But in this example the program amalgamates 2 WAV files as in my case its 1 WAV file + 1 text file = 1 WAV file with all information in it.
That's about the only article I know of that demonstrates who to manipulate the headers of a WAV file.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hey can anyone help me by telling me any info regarding tcp port sniffing or monitoring...i want to monitor a certain port on my computer for incoming and outgoing data, how can i do that?
thanks
obi-wan
|
|
|
|
|
You'll need a 3rd party library just to get started. Something like WinPcap[^]. Get the latest Development Pack, under the Development tab on the left, and it'll come with the documentation for the library.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir/Madam,
Can I programically find out whether the particular table exist in the database or not.
Thanks abd Regards
|
|
|
|