|
Greetings,
I'm building an App that reads a very big XML file and saves the data in a SQL database.
The XML file is in encoding windows-1250 and it can't be changed.
The main point is to read all characters in the XML including croatian letters (Č,Ć,Ž,Š,Đ)
I have tried this code first: (with this method I get an error 'platform not supported'
xmlDoc = New XmlDocument()
xmlDoc.Load(xmlPath)
The second try: (in which I try to transform the encoding windows-1250 to UTF-8, It reads the XML but it deletes the croatian letters)
fileS = New FileStream(putanjaXml, FileMode.Open, FileAccess.Read)
xmlContext = New XmlParserContext(Nothing, Nothing, "", XmlSpace.Default, System.Text.Encoding.UTF8)
xtr = New XmlTextReader(fileS, XmlNodeType.Document, xmlContext)
xmlDoc = New XmlDocument()
xmlDoc.Load(xtr) // Not supported platform
fileS.Flush()
fileS.Close()
xtr.Close()
I have also tried the above method with system.text.encoding.Unicode and UTF7. But no luck.
So please does someone know how to read this XML file with this encoding (the METHOD must be xmlDocument.LOAD)
Thank you very much!
|
|
|
|
|
Hello all,
Do anybody have some idea of the Rinjdael algorithm? I ahve encryt some data from this algo but i am not geeting anything accurate on web. Please tell me the logic of the algorithm.
Neema Jain
|
|
|
|
|
|
Don't cross-post the same question in three forums! Please read the forum guidelines!
|
|
|
|
|
nimsrav wrote:
Do anybody have some idea of the Rinjdael algorithm?
Yeah, it works pretty good
nimsrav wrote: Please tell me the logic of the algorithm.
There was an article about it years ago in Dr. Dobb's Journal.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
how r u all
I'm creating an application to download files from internet, but I faced a problem when downloading from rapidshare.com, coz I have to enter the user name and password.
if anybody know how to do this plz help me
|
|
|
|
|
if u need to pass parameters to a web address u say
www.theWebAddress.com?parameter1=value...
|
|
|
|
|
hamzahaidar wrote: I'm creating an application to download files from internet, but I faced a problem when downloading from rapidshare.com, coz I have to enter the user name and password.
Wouldn't it be easier if you just post your existing code and let people look at it to see what the problem is? Or at least describe the methods you are using to get the file right now.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
DigiOz Multimedia wrote:
Wouldn't it be easier if you just post your existing code and let people look at it to see what the problem is?
Could be, but some people have the tendency to dump all of the code in the post rather than just the trouble spot.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I never use ajax..
I want to use AJAX in my asp.net 2.0 application how i can enable ajax for that application
Girish Soni
|
|
|
|
|
sonigirish wrote: I never use ajax..
I want to use AJAX in my asp.net 2.0 application
You want to start off with a book... Maybe Rama Krishna Vavilala can help you select one
|
|
|
|
|
I've added the following code to a test project, added the reference to Microsoft Shell Controls and Automation, imported the Shell32 namespace:
Dim objShellWindow As Shell
objShellWindow = CreateObject("Shell.Application")
MsgBox(objShellWindow.Windows.ToString)
I need the title bar text of Windows Explorer and each of it's instances, but with this code I only get:
System.__ComObject.
Thanks again and I'm sorry for keep bugging everyone on this problem.
Regards
Graeme Guildford
I am always greteful for any help!
|
|
|
|
|
The "Windows" method returns a collection of Shell-owned ShellWindow objects. You're calling ToString on that collection, which cannot be converted to a string. That's where you're getting the "System._ComObject" from.
You have to add a second COM reference to "Microsoft Internet Controls". Your code to enumerate the Shell Windows would look something like:
Imports Shell32
Imports SHDocVw
.
.
.
Dim objShell As New Shell
Dim shellWindows As ShellWindows = objShell.Windows
For Each window As ShellBrowserWindow In shellWindows
Debug.WriteLine("LocationName: " & window.LocationName)
Debug.WriteLine("LocationURL : " & window.LocationURL)
Next
|
|
|
|
|
Thank you so much Dave, this worked perfectly.
I appreciate all the help you gave me with this problem.
Graeme
I am always greteful for any help!
|
|
|
|
|
Hi,
This is Atheeq, vb.net developer. I hv one problem when executing sql query in vb.net actual the commands are like
Dim strsql,Strsql1 as string
flds = Trim(flds) & "Season='" & cmbseason.Text & "' and OrderID ='" & Trim(cmbord.Text) & "'"
strsql="Select * from VOrder1 where " & flds & ""
strsql1 = "Exec Master..xp_CmdShell 'bcp " & strsql & " queryout C:\test.xls -c'"
os.InsUpd(strsql1) 'here os is class for connecting datasource
in the above strsql1 command the inside quotes cannot be accepted in vb.net " " " "
Please can you help me how to solve this problem.
Best Regards
Atheeq
India
|
|
|
|
|
Concatenating strings together in a sql string is considered dangerous practice. It opens you up to sql injection attacks.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Good moring good people.
My Name's Moses and I'm strugling to put together a log in code to the database. Please help me, I want to create a username and other details, then later I use a username and password I created earlier to login in windows form. Im using vb.net 2005
|
|
|
|
|
Hi,
Your question is not that specific. Here are some general steps to achieve what you want.
1. Create a database.
2. Create a table in that database that will hold your user credentials like username/password etc.
3. Create a database connection with your VB.net application.
4. Now you can do queries to your database like to insert a user or to get a user etc.
Thanks,
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
deepblu@webmail.co.za wrote: I'm strugling to put together a log in code to the database
What are you having trouble with? Creating the table, the logic, what?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi everyone!
i am trying to do some list of files, which have been printed. therefor i will try use the print event. when a file is printed the event is "started". when it is "active" i do want to get the filename of the file to be printed. with this info i do want to either create a list of files, which have been printed or add some kind of flag to the fileinfo.
but in general my step number one has to be to get the filename.
by the way, is the print event thrown when the print dialog is displayed or when the fileinfo is sent to the printer, meaning after having confirmed this dialog by clicking ok? because if the dialog is left by clicking cancel then there would be a wrong signal, because the file was not printed, when the event fires when displaying the dialog.
thanks.
stephan.
|
|
|
|
|
stephan_007 wrote: i am trying to do some list of files, which have been printed.
Is this list to be documents printed only from your application or from any application system wide??
stephan_007 wrote: when it is "active" i do want to get the filename of the file to be printed.
If this is to determine the filename system-wide - you can't get the filename. The printing application isn't required to tell the print spooler what the document filename is.
If it's from your application only - then you have the same problem, but you can write code to track which document you're printing and supply the filename through your code internal code.
stephan_007 wrote: by the way, is the print event thrown when the print dialog is displayed or when the fileinfo is sent to the printer
There is no "fileinfo" sent to the printer. The application does the rendering of the page image. The printer driver converts that image into something the printer can understand. It does NOT use the source filename of the document.
|
|
|
|
|
i do have an application, which stores my files (lets compair it to windows explorer).
i want to mark the file and then choose print. and if i press ok in the dialog window, the event is thrown (thats what it says in the docu). when it is finished the event is thrown again, but with a different id. (print started is one fixed id and finished printing is the other one).
i am not interested in when it is finished, i am just interested in if at least once the file was printed.
the application uses vbs, but i am not sure if it is real vbs. the data objects are different for sure. but because the printerobject is a windows object (uses the same printers listed there) it has to be similar.
so you think no matter which application i do use, i can't get the filename which is just printed?
lets say i do print mine.txt then i want it to be marked as printed in the database. well if it is not possible to get the filename to which the printer dialog box was just displayed and confirmed by clicking ok, then i will have to try something different. but if it is possible, please let me know.
|
|
|
|
|
stephan_007 wrote: so you think no matter which application i do use, i can't get the filename which is just printed?
Nope. There is no generic Windows print function that automagically knows how to interpret and print every file format. When you click on a file in Explorer (or any other app for that matter) and click Print, the application that created the file is launched and IT prints the file, and follows the process I outlined earlier. Nowhere in the process does the printing syustem ever know, or care about, the filename of the job that is printing.
If this is an Explorer type app where you are in control of launching the printing process for each file, then that is the only place you can get the filename. Just before you launch whatever code you're using to print the document. Trying to get the filename from the printing printing system is impossible since it doesn't know anything about filename.
|
|
|
|
|
nope, thats not what i meant. i meant if you have a file lets say in excel, then i want to print it, this starts the print event when the print dialog is displayed. when i send the file to printer this starts the event once (unique id for this event) and when it is printed and finished, then the event is thrown once again (another unique id).
so as i said before lets say i do print the file in excel. does the printer event carry some infos about which file was just sent to the printer (without checking it via the opend map)?
because if this is possible then it should be possible as well for any other application which is realized in windows, because it uses the same print function. lets say in word, internet explorer, notepad or whatever the print event should be the same.
and i was wondering, if it is possible to read some kind of parameter in the printer event telling me, which file was just sent to the printer to get the filename. the file will be printed in its "own" application (meaning excel for xls etc.).
but my question is: does the printevent store some kind of filename info in its event. because if it does i would like to access this info and read the filename for further use.
because when i read your last reply i guess there was some kind of misunderstanding. i was wondering if the printevent carries the filename info to be accessed and to know which file will be printed.
thats what i want to find out or realize in an vbs program/makro.
i know, in excel i could access the opend map, but where would i have to look for in notepad for example? thats why i wanted to access the printer event because it should know about the filename because where does the outputwindow of a printer get the info of to display the current status of the print progress?!
stephan.
|
|
|
|
|
stephan_007 wrote: i meant if you have a file lets say in excel, then i want to print it, this starts the print event
Print event? In what code?? Let's see it, because there is no "global" "print event".
stephan_007 wrote: so as i said before lets say i do print the file in excel. does the printer event carry some infos about which file was just sent to the printer
No. No file was just sent to the printer. Excel had to render an image of each page itself, which, as I explained before, is translated into the printers language by the printer driver. Nowhere in this process is the filename of the Excel document ever used.
|
|
|
|