|
Thanks! I am working on it... Hopfully it will work!
colgateas900197
|
|
|
|
|
i have used this command on the VS 2003 but am using VS 2005, VB and its telling me that file not found, and even i experimentally create the file, i think there is an error in it but can get the exact error
Shell("cmd /c net view " > "C:\cnames.txt", AppWinStyle.Hide, True)
guess its suppossed to get the computers on the lan and save the whole view onto a txt file....
whats the file not found error coming from,....any1 wanna help? Thanks
phatkin
|
|
|
|
|
Why would you want the '>' to be outside the quotes? Why is your command not:
Shell("cmd /c net view > C:\cnames.txt", AppWinStyle.Hide, True)
I'd guess that it's actually resolving the first part of your parameters, so what you've got is actually:
Shell(False, AppWinStyle.Hide, True)
|
|
|
|
|
Thanks so much.
thats what i wanted to do
it works now
\Thanks
phatkin
|
|
|
|
|
Hi,
Is it possible to dynamically change the name of the web services ??
If yes, Kindly let me know how to go about it.
Thanx in advance.
Susheel Kumar
|
|
|
|
|
What would you need to do this for?
I don't know about changing the name but you don't have to do a 'add web reference'. you can dynamcially choose webservices on the fly as well as point to different locations for test/qa/production/etc...
-- modified at 17:29 Wednesday 22nd August, 2007
|
|
|
|
|
Hi,
I'm having FileStream.Write behave rather oddly.
The code below should take file a.txt and append it to file b.txt :
Dim buffer As Byte()<br />
Dim bytesRead As Integer<br />
Dim fStreamIN As New FileStream("c:\a.txt", FileMode.Open, FileAccess.Read)<br />
Dim fStreamOUT As New FileStream("c:\b.txt", FileMode.Append, FileAccess.Write)<br />
ReDim buffer(fStreamIN.Length)<br />
<br />
bytesRead = fStreamIN.Read(buffer, 0, fStreamIN.Length)<br />
MsgBox("Read bytes:" + Str(bytesRead) + " Expected:" + Str(fStreamIN.Length))<br />
MsgBox("byte 1:" + Chr(buffer(0)) + vbCrLf + _<br />
"byte 2:" + Chr(buffer(1)) + vbCrLf + _<br />
"byte 3:" + Chr(buffer(2)) + vbCrLf)<br />
fStreamOUT.Write(buffer, 0, buffer.Length)<br />
<br />
fStreamOUT.Flush()<br />
fStreamIN.Close()<br />
fStreamOUT.Close()
I test with :
a.txt "abc"
b.txt "<this is="" the="" orig="">"
Now when I run this code, the characters in a.txt are read correctly to buffer, but the file b.txt contains :
"<this is="" the="" orig="">扡c"
What on earth is going on ???
cheers guys
|
|
|
|
|
You need to read it as text, not bytes. The odd character is probably caused by the file containing some sort of encoding identifier at the start, which you then appended blindly on the end of the file.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
I want to add a warning:
Your code is unsafe, you somehow expect a number of bytes being read that could
differ from what you ask, but you don't use it when writing the data.
bytesRead = fStreamIN.Read(buffer, 0, fStreamIN.Length)
...
fStreamOUT.Write(buffer, 0, buffer.Length)
it should have been: fStreamOUT.Write(buffer, 0, bytesRead)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I've defined an image control (System.Windows.Controls.Image)
I need to set the image.source property at the run time setting an image loaded from my.resources
image.source = system.windows.media.imagesource
my.resources è un tipo system.drawing.bitmap
If i try to directly assign my,resources.image i got "Cannot convert "System.Drawing.Bitmap" into "System.Windows.Media.ImageSource"
Can someone help me?
Bob1970
|
|
|
|
|
|
I am building a 3 layer solution.
Well, I use the data application block from enterprise library 3.1 and visual studio 2005.
I have configured my app.config with the editor that enterprise library recomends. I have defined my connectionstring and my provider.
When my application run, appear a error, objeto no referenciado.
It is generated from my dataaccess layer.
Someone says to me that app.config must be in the client layer.
I have put my app.config in my dataAccess layer. It can be?
So,if my app.config is in the client layer, Do I need define something else or my application block will recognize it automatic?
Tanks in advanced
JESHU
|
|
|
|
|
Hi i just want to add a simple formula to a sql database table
everytime i try to add a formula in the table it throws back a valadateing error
how do i add the formula to the table ??
cheers
|
|
|
|
|
Which formula you are trying to add?
Ejaz
|
|
|
|
|
i have a table and i have a column called area and another called height i want 2 * them together in a column i got called volume ?
|
|
|
|
|
At a guess you are coming from an access environment where you can have calculated or virtual columns.
These do not exist in SQL Server. You have 2 options
1 do the calculation in the select query when you retrieve the data
2 create a view of the table with the calculation in the view.
|
|
|
|
|
hi
I am writing a word document and it is my first time i need to know
1- how can i draw a vertical line from top to bottom on every page.
also after drawing line i have to write on both sides of it ( Sr. No appears on left side of line and text appears on right side)
2- how can i specify the heading information for every page ( i need to show an image and some text on every page as heading).
Salman Sheikh
|
|
|
|
|
Hello
I am using reporting tool in which master db's dateformat is 'yyyy-MM-dd'. In the programming level after getting the date from the user as 'dd-mm-yyyy' I need to change to the "yyyy-MM-dd".
I will appreciate if u can do it yesterday!
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
which language and version do u use?
phatkin
|
|
|
|
|
vb.net 2005
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
If you are updating the record through SQL command then use format(date,"yyyy-mm-dd").
Hope this will help.
Ejaz
|
|
|
|
|
if your program is in visual basic .net then following statement may solve your problem
date.ParseExact(DateStringFromUser,"dd/mm/yy" ,new system.Globalization.DateTimeFormatInfo).ToString("mm/dd/yyyy")
Salman Sheikh
|
|
|
|
|
Hi sheikh,
Thank you for your response.
While I debug the application, it is showing "String was not recognized as a
valid DateTime"
Please advise me
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
date.ParseExact(DateStringFromUser,"dd/mm/yy" ,new system.Globalization.DateTimeFormatInfo).ToString("mm/dd/yyyy")
here date from user is the string user enters and the next argument is the format of the string entered by user
i.e if user enters
"03/08/2007" then the format is "dd/MM/yyyy"
and the argument in ToString method is the format you require to use
Salman Sheikh
|
|
|
|
|
Hello Friends,
I want to write a prg., which will have a Rich Text Box. User can enter & format text. Can be saved in a RFT file. I know all that stuff. My point is, user will open a rtf file, select customers to send the letter to. I got to merge the letter and the addressed of the customers and the user can print Page wise. Can I save it in a new rtf or doc file? I want similar output as we do in Word.
Is this kind of application possible! If I let this application make from some one, how much should it cost (Just to make my work easy, want to know)?
I want to make it, how do I make it. Any guidlines, reference, help is highly appreciative.
Thanks
Terry
|
|
|
|