|
Hi! I have this dilema. I have to pull data from DB to Excel. But the deploy machine has Windows 98, so Visual Studio Tools for Office does not work on win 98... any suggestions?
Thanks!!!
Agustín
|
|
|
|
|
Hi,
Im trying to search through an XML file. When it finds the record it needs it then updates a specific field in that record. I have made it find the specified record but do not know how to update it and write it back to file. I am new to XML coding. Any help would be most appreciated.
Dim xpathDoc As XPathDocument
Dim xmlNav As XPathNavigator
Dim xmlNI As XPathNodeIterator
Dim filePath As New OpenFileDialog
filePath.ShowDialog()
xpathDoc = New XPathDocument(filePath.FileName)
xmlNav = xpathDoc.CreateNavigator()
xmlNI = xmlNav.Select("/Message/Pupils/PupilCode")
While (xmlNI.MoveNext())
System.Console.WriteLine(xmlNI.Current.Name + " : " + xmlNI.Current.Value)
If (xmlNI.Current.Value) = "A123981456002" Then
'ONCE ITS FOUND THE RECORD - DISPLAY A MESSAGE
'SELECT THE DIFFERENT FIELD WITHIN THE RECORD
MsgBox("Found")
xmlNav.Select("/Message/Pupils/PupilAge")
'THIS IS WHERE IT NEEDS TO UPDATE IT. NO IDEA HOW TO DO THIS BIT
End If
End While
This may be the wrong way to do it - I'm not sure. I just need it to search for a specific pupil ID and update their age with a specified value. After that it has to write the entire XML file to a new file.
Many thanks.
Chris
|
|
|
|
|
|
I developed a project that generates a xml file form a database and upload it to a webserver. I think it is possible to check the generated xml file having virus or any harmful threat. So i want to trigger the anti virus software to scan that xml file and if no threat was found then upload that file or inform that the file has a virus.
Please any of one help me to accomplish this task, the main thing is the source must be in VB 6.0 :(code.
Vijay V Anand
|
|
|
|
|
You don't have to. With most antivirus software, the file is scanned when written to the hard drive.
Besides, with all the different versions out there, and all the different API's they MIGHT expose, your idea will be a nightmare to implement. There is no generic interface to launch a scan of a file without having to know what anitivirus software is installed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Virii in XML files? That's strange. XML is a text format, how would it be possible to write virii using it?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I am trying to make dialog box that will be popup from my addins in excel.
I want to have that dialog looks like the find and replace dialog. so that
user can select cells and type some character into a cell. Right now I
create
a kinda floating dialog using the following method. however i can only
select
cells but not able to right some characters into a cell.
mlHWnd = FindWindowA("XLMAIN", oHostApp.Caption)
'Enable the Window - makes the userform modeless
EnableWindow mlHWnd, 1
Any one has any idea how to create a similar to find and replace dialog in
the
excel?
Thanks in advance
Shin
|
|
|
|
|
Hi everyone!
I'm using this great code above (that I downloaded here) but it's returning the HTML code with one "?" for each "," "ç" "ã" "ô" etc... I think it's related with unicode, but I don't know what to change.
Function GetHTML(ByVal strPage As String) As String
Dim oReq As System.Net.HttpWebRequest
Dim oResp As System.Net.HttpWebResponse
oReq = System.Net.HttpWebRequest.Create(strPage)
oResp = oReq.GetResponse
Dim sr As New IO.StreamReader(oResp.GetResponseStream)
Return sr.ReadToEnd()
end function
Thanks in advance!
|
|
|
|
|
Ok! I solved it using UTF7 enconding in the streamreader!
|
|
|
|
|
Hello,
I am 7 months young into the vb.net world so i am at that almost their, "but not really point"! Alot of sleepless nights going on over here.
Here is my 10 problem.
If i have a dataset in my vb behind file and in the html i am setting the object <%# databinder.Eval (Container.DataItem, "Customers" %#>,,, So here is the question; if the dataset has one table, and yes that would be Customers, how can i set the databinder.eval to only ONE field in that dateset table?
Please help as soon as possiable!!!
+++++++++++++++++++++++++Here is the html+++++++++++++++++++++++++++++
<asp:datalist id="dlProducts" runat="server" repeatcolumns="2" width="504px" repeatdirection="Horizontal">
<itemtemplate>
+++++++++++++++++++++++++Here is the vb file+++++++++++++++++++++++++++++=
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim strError As String
SessionCheck(Session, Request.Cookies("AFCC"), strError)
GetNotifications(lblNotification, Request)
' Set up the department data
cmdRetrieveDept.Parameters("@idDepartment").Value = _
Request("idDept")
Dim dsDept As New DataSet
Dim daDept As New SqlDataAdapter
daDept.SelectCommand = cmdRetrieveDept
daDept.Fill(dsDept, "Department")
dlDept.DataSource = dsDept
dlDept.DataMember = "Department"
' Set up the product data
cmdRetrieveDeptProducts.Parameters("@idDept").Value = _
Request("idDept")
Dim dsProducts As New DataSet
Dim daProducts As New SqlDataAdapter
daProducts.SelectCommand = cmdRetrieveDeptProducts
daProducts.Fill(dsProducts, "Products")
dlProducts.DataSource = dsProducts
dlProducts.DataMember = "Products"
' And bind it all to the user interface
DataBind()
' Store the department ID for later use in building links
Session("LastIDDept") = Request("idDept")
End Sub
Private Sub Page_Error(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Error
Dim strMessage As String = "" & _
"" & Request.Url.ToString() & "" & _
"
<font color='red'>" & Server.GetLastError().ToString() & _
" "
Response.Write(strMessage)
End Sub
End Class
Erik
|
|
|
|
|
I usually set my DataSource to a DataTable in the DataSet (lst.DataSource = ds.Tables("MyTable")) or to a DataView. Then the binding code is:
<%# DataBinder.Eval(Container, "DataItem(""MyFieldName"")") %>
|
|
|
|
|
Hi!
I am having a trouble exporting my report to pdf. Everytime I'll click on the export button, the page runs to a blank page. Also, there are times when i click the export button, an error occurs saying "Logon Failed" Here's my code. Hope you can help me
Private Sub cmdExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExport.Click
oStream = New MemoryStream
oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
Response.Write(oStream)
Response.End()
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
End Sub
Thanks!
|
|
|
|
|
mizu_chil wrote:
Logon Failed
I believe, that you must provide information about the database location, user name, and password. '
mizu_chil wrote:
oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)
Where did you create the rpt ?
<italic>Work hard, Work effectively.
|
|
|
|
|
hi!
do you have a sample code that i may look at,,, or if you wouldn't mind, can i ask you to write the step-by-step instruction,,,
tnx for the reply!
|
|
|
|
|
For logon problem, see this.[^]
<italic>Work hard, Work effectively.
|
|
|
|
|
im sure its possible to open up a dll during runtime so you can somewhat explore what objects are in it, but how do you do it? ive tried messing around with things in the System.Reflection, mostly with the Assembly object in that, but cant seem to figure it out.
any ideas?
thanks
|
|
|
|
|
It's fairly straightforward, look for the System.Runtime.Reflection namespace. You'll find Assembly.LoadXXX methods to load an assembly. Those methods return an Assembly reference, on which you can call GetTypes() . You can then iterate through the Type array returned by it and display whatever information you want to.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
PeriodAdapter.Fill(DataSet11, "period")
Dim datatable As DataTable = DataSet11.Tables("Period")
Dim dr As DataRow = datatable.NewRow
Dim r() As DataRow = datatable.Select("periodno= max(periodno)")
Dim i As Integer
For i = 0 To r.Length - 1
dr("periodno") = CInt(r(i)("periodno")) + 1
dr("begindate") = DateTimePicker1.Value.Date
dr("enddate") = DateTimePicker2.Value.Date
datatable.Rows.Add(dr)
Next
MsgBox("New period has been saved", MsgBoxStyle.Information, "New Period")
PeriodAdapter.Update(DataSet11, "period")
--------------------------
Well i havent search from internet about this fucntion yet and above code is just what i modify a bit and use for generate new id or number to my record by adding 1. The problem is if there are not records at database, above code cannot add the first record let said periodno =1 ........... and keep giving blank record when i see at my database. if i manually insert periodno=1 then above code can give the next periodno=2.
How to make condition if my database is empty, i tried use Nothing syntax also cannot. What should i do....
|
|
|
|
|
Hi,
first of all: If your periodno is unique you won't need the loop.
To your question: If you don't have any entries in the Period table the Select function will return an empty array:
PeriodAdapter.Fill(DataSet11, "period")
Dim datatable As DataTable = DataSet11.Tables("Period")
Dim dr As DataRow = datatable.NewRow
Dim r() As DataRow = datatable.Select("periodno= max(periodno)")
Dim nextPeriodNo as Integer
If (r.Length == 0) Then
nextPeriodNo = 1
Else
nextPeriodNo = CInt(r(i)("periodno")) + 1
End If
Dim i As Integer
dr("periodno") = nextPeriodNo
dr("begindate") = DateTimePicker1.Value.Date
dr("enddate") = DateTimePicker2.Value.Date
datatable.Rows.Add(dr)
MsgBox("New period has been saved", MsgBoxStyle.Information, "New Period")
PeriodAdapter.Update(DataSet11, "period")
|
|
|
|
|
Hello there
I am creating a folder(s) on the server through my application and want no one to access that folder without providing a password on it. even administrator has to provide the folder(s) password before accessing it.
any idea's
|
|
|
|
|
It is possbile but requires your to write a file system extension. This is NOT easy and requires a deep understand of the internals of NTFS and COM.
Your first step is to order the Windows Device Driver Development kit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there
I want to build an application which will convert the text into image . I tried through simple Drawing functions and manage to solve it for text files. but as far the word document or html files are concerned it has problem. as Word has some special headers which are not visible in word but are visible if you open them in text file. and in HTML it make an image of source code.
any ideas would be apprciated..
|
|
|
|
|
You'd have to use Word Automation for that. Instead of directly using the doc files generated by Word, you must open them through Word and get their contents. Google for "MS Word Automation" and you should get plenty of help.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I need some help with code or the code for a small string encryption function.
On a command button press, I basically need all the values, either letters or numbers, to be sent to a text file.
I know the App.Path code, and the basic way in which to send text values from text boxes into the App.Path file.
All I need is a way in which to take the characters inside each of the text boxes and encrypt them, and send that info to the App.Path file.
MChr$(Asc(Mid$(Smurg, l, 1)) Xor 7) <--- This sort of thing I believe.
If anyone can post something similar or give me some hints, I'd be greatful.
Thanks in advance,
Smurg.
Smurg.Enabled = True
|
|
|
|
|
hi
i wish to make a form or splash screen that contain Flash
can it be done?
kindly guide me on this...if possible is there any tutorial?
thank you in advance
Gary
|
|
|
|