|
When printing a report from the reportviewer to the Zebra TLP2844 it does not print the report in landscape. When printing to the HP laser printer landscape works fine. Is there something I need to do to get the Zebra to print in landscape?
When printing a word doc to the Zebra printer it does print in landscape.
I do have the lastest version of the reportviewer.
|
|
|
|
|
I need to get the folder list of an ftp site
I found some code that (after adapting a small bit) does exactly that but if I try to request the folder list for a specific folder it doesn't work anymore.
Order of events: I check to see if the folder 'ftpmap' is present in the root directory of the ftpserver
if not: I create it
---untill here everything works perfectly
I check to see if the folder 'test' is present in the folder 'ftpmap'
---this is where things go wrong
I get an error:
The remote server returned an error: (450) File unavailable (e.g., file busy).
from what I'v been able to figure out is that the folder 'ftpmap' is still in use by the previous request. But I closed everything I could think off.
here is the code that requests the folders (and files) of a ftpserver:
Public Function GetFolderList(ByVal ftppath As String) As List(Of String)
Dim folderlist As New List(Of String)
'Try
Dim result As New System.Text.StringBuilder()
Dim reqFTP As FtpWebRequest
reqFTP = DirectCast(FtpWebRequest.Create(New Uri(ftppath & "/")), FtpWebRequest)
reqFTP.UseBinary = True
reqFTP.KeepAlive = False
reqFTP.Credentials = New NetworkCredential(ftpuser, ftppass)
reqFTP.Method = WebRequestMethods.Ftp.ListDirectory
Dim response As WebResponse = reqFTP.GetResponse() ' THIS IS WHERE THE ERROR HAPPENS
Dim reader As New StreamReader(response.GetResponseStream())
'MessageBox.Show(reader.ReadToEnd());
Dim line As String = reader.ReadLine()
While line IsNot Nothing
result.Append(line)
result.Append("" & Chr(10) & "")
line = reader.ReadLine()
End While
result.Remove(result.ToString().LastIndexOf(Chr(10)), 1)
Dim sall As String() = result.ToString.Split(Chr(10))
For Each s As String In sall
If Not s.Contains(".") Then
folderlist.Add(s)
End If
Next
reader.Close()
response.Close()
Return folderlist 'result.ToString().Split(Chr(10))
'Catch ex As Exception
'End Try
Return folderlist
End Function
does anyone know why this is happening or does anyone have a better way of doing this.
-- modified at 10:11 Friday 19th October, 2007
is there anyway I can extract the number (450) from the execption?? besides the contains methode
because if I can do that I can have my programme working perfectly
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
How can I set my program to only download if a newer version is available? My program right now is set to download a file from my site every time it opens but I dont want it to do that. I would like to only download the file if the time and data has changed in the FTP?
|
|
|
|
|
|
hi friend
i have edting the value of app.config in windows application. code work properly its not give any error but its not change the value of app.config
plese help code:-
Public Sub asaas()
Dim XmlDoc As New XmlDocument()
'XmlDoc.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
Try
XmlDoc.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
' Navigate Each xml Element of app.Config file
Dim NodeList As System.Xml.XmlNode = XmlDoc.SelectSingleNode("/configuration/applicationSettings/filesave.My.MySettings/setting/value")
' Save app.config file
NodeList.InnerXml = TextBox1.Text
XmlDoc.Save(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
app.config:-
(?xml version="1.0" encoding="utf-8" ?)
(configuration)
(applicationSettings)
(filesave.My.MySettings)
(setting name="filesave_localhost5_Service" serializeAs="String")
(value)http://localhost/file/Service.asmx(/value)
(/setting)
(/filesave.My.MySettings)
(/applicationSettings)
(/configuration)
plese help argent
Piyush Vardhan Singh
|
|
|
|
|
hi All
Am Trying to sending an E-mail from my Windows Vb Application, i want to know the namespace that am going to import. am using vs2003. please provide me with an Example code, tutorial or an Article for sending an E-mail in a wndows application.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Did you Google this at all?
Plenty of examples are out there.
http://www.jscape.com/articles/sending_email_using_vb.html
http://www.freevbcode.com/ShowCode.asp?ID=6401
http://www.codeproject.com/vb/net/epsendmail.asp
|
|
|
|
|
hi svanwass
i always Google, before i post, i got .NET 2.0 or web Example, that couldnt help , because i needed it for Windows Application.
thanks for you help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I have an datagrid who is filled automaticly by an .csv file
<br />
Private Sub frmCsv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Dim file As String = "steelandt.csv"<br />
Dim pad As String = "C:\"<br />
Dim dataset As New DataSet<br />
<br />
Try<br />
Dim bestand As System.IO.File<br />
If bestand.Exists(pad & file) Then<br />
Dim ConStr As String = _<br />
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _<br />
pad & ";Extended Properties=""Text;HDR=Yes;FMT=Delimited\"""<br />
Dim conn As New OleDb.OleDbConnection(ConStr)<br />
Dim databaseAdapter As New OleDb.OleDbDataAdapter("Select [PO],[Item],[Due Date],[Item Description] from " & _<br />
file + " WHERE PO>0 order by PO ASC", conn)<br />
databaseAdapter.Fill(dataset)<br />
End If<br />
<br />
<br />
Catch ex As Exception<br />
MessageBox.Show(ex.ToString)<br />
End Try<br />
<br />
DataGrid.DataSource = dataset.Tables(0)<br />
<br />
Now as you can see I import just 4 columns (PO, Item,Due Date and Item description)
When I run the program everything works except :
It doesn't load the item and due date colum....
and to make it worse, it imports just a few values of the column item
How come ??
|
|
|
|
|
How To Disable a Control without changing the style( backcolor,Forecolor...)
|
|
|
|
|
someControl.Enabled = False
|
|
|
|
|
just change the backcolor after you disable it, if it is a richtextbox there is no solution.
|
|
|
|
|
Hi I need to publish my application with an access database. I seem to be getting this error message when I try. . "Unhandled exception has occured in your application....then it says it could not fing "c:\Documents and Settings\s20428578\digitalfusion.mdb" I also need to hand in my project today and I dont know what is happening
Mr Oizo
|
|
|
|
|
What do you mean Publish?
Is it a Windows Application or Web Application?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Are you sure that the database is in the project folder ?
Maybe you have him linked remote to your project and when you want to publish it needs to be in the project folder?
|
|
|
|
|
whats the code to check whether an external process has exited or not.The external process was indirectly,i stress that again,INDIRECTLY,started by my vb.net program,
Thanks in Advance,
Vivek
|
|
|
|
|
you can use WMI for that !!!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Try out
http://www.microsoft.com/downloads/thankyou.aspx?familyId=2cc30a64-ea15-4661-8da4-55bbc145c30e&displayLang=en
|
|
|
|
|
I want to know the possible way to append a text file placed on webserver.
I am using vb.net and server is unix based.Will that create a problem?If it is a problem then we need to switch to windows server. Please help me its urgent
Regards
Shailendra
|
|
|
|
|
can you be a bit more specific in what you want?
as I understand it either you want to place a file on a webserver
or you want to download a file from a webserver and use it
in both cases it is possible if that webserver has an ftp server thru wich you can access the file
but without knowing exactly what you want I can't give you any specific code.
On a side note: don't put 'it's urgent' in you'r post (or subject) everybody's question here is urgent in some way, but this forum is manned by volonteers who will answer the questions the can when they can
anyway if you can provide me with a more detailed explanation of what needs to be done I can see about the code since I'm working on a programme that does pretty much everything one can do with ftp I'm sure I'll find some code to help you
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hello every one.
I am creating a application in which i allow user to choose a color from pallet and the new drawing will be of that color...
I problem is that i want to use the back color of the pallet's label as pen color, but system.drawing.color dose not accepts RGB .... what to do???
|
|
|
|
|
nishkarsh_k wrote: i allow user to choose a color from pallet
Perhaps you mean a palette rather than a pallet?
nishkarsh_k wrote: system.drawing.color dose not accepts RGB
Of course it does. Use the Color.FromArgb method to create a color value from color component values.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Thanks for correcting
FormArgb solves my issue
Thanks
|
|
|
|
|
I am relatively new to database concepts, so please forgive any incorrect terminology.
I have created a custom query that gets a users data based on the user name they have entered, when i put this line in code:
Me.UsersTableAdapter1.FillByUserName(PasswordManagerDataSet1.Users, UNTextBox.Text)
I get an error to do with constraints, but i don't understand why.
Also i get a concurrency violation error when i try to update a record after filling a table using a custom query. Fill:
Me.PasswordTableAdapter.FillPasswords(Me.PasswordManagerDataSet1.Password, User)
I also get a constraints issue here.
I am trying to update using the automatic stuff VS2005 adds (i.e. the save button in the navigation bar it adds).
This is the save code:
Me.Validate()
Me.PasswordBindingSource.EndEdit()
Me.PasswordTableAdapter.Update(Me.PasswordManagerDataSet1.Password)
|
|
|
|
|
The ANZAC wrote: Me.UsersTableAdapter1.FillByUserName(PasswordManagerDataSet1.Users, UNTextBox.Text)
I get an error to do with constraints, but i don't understand why.
What are the constraints in the database?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|