|
Please do not cross post, its rude.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
Hi
I am using the following code to retrieve an HTML page contents but it is throwing an exception for certain page of javascript type. Following is the code used to retrieve the page.
Dim objWebClient As New WebClient()
Dim objUTF8 As New System.Text.UTF8Encoding()
Dim strRequestHTML As String
strRequestHTML = objUTF8.GetString(objWebClient.DownloadData(New Uri("http://search.live.com/results.aspx?q=basic")))
Here the error is thrown while downloading the data that an unspecified error occurred at line #.
I want to suppress this error, please suggest me any mod which could do the trick. I would be so thankful to you.
Thanks and Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
Try to supply request headers as a valid JS supported browser. This may avoid JS errors. I don't think that you can suppress it.
|
|
|
|
|
Hi
Thanks for the reply.
Can you please give me an example?
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
Hi guys
I just have analyzed that the problem is not in this procedure but the upcoming syntaxes are throwing the error:
Dim aDoc As IHTMLDocument2 = New HTMLDocumentClass()
aDoc.write(strRequestHTML)
aDoc.close()
I am using this procedure to access all the elements of the downloaded HTML page and the error throws at aDoc.write(strRequestHTML) and I think it is because there are javascripts which are supposed to be loaded but the current implementation is not letting it loaded so the functions which are using them are of course left undefined which in turn throwing the error.
Please help me in this regard, I would be so thankful.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
since you have the string you can prepend to it:
<script language="JavaScript" type="text/javascript"> <!--
function stoperror(){return true}
window.onerror=stoperror
// -->
</script>
This will suppress the javascript errors, if that is what is causing the problem.
|
|
|
|
|
Hello All;
Forgive me for cross posting but I'm not getting any answers from the SQL group.
I have a SQL db that collects environmental data. As it gets larger the performance of the server suffers. So I think that I would like to copy the "working" db to a new db then purge the working db. The be able to run querrys that span the databases.
I would like to do this using VB.net
I have been able to backup the db. Cant seem to get the DROP and Restore to work keeps telling me the the db is in use. Which is why I thought I had to do the DROP??
Haven't been able to find any info on the "bulk" copy or rename issue or the purging of the working db but I'm still researching it.
As an example.
If we backed up the db monthly and renamed them lets say to the month and year name. Then purged the working db. Would it later be possible to run querry's that spanned the db's.
1. Is this a doable concept?
2. Would I?
"Drop" the working db
Copy all the data from the working db to a new db
Purge the tables in the working db
Just looking for some conceptual help here to make a plan to do this. Any help or guidence you could give be would be greatly appreciated.
I have found info on the SQL DMO but because I have 2005 enterprise, 2005 express, 2000 enterprise and MSDE box's I have been trying to do this in pure VB/ADO. Is this valid reasoning for not using SQL DMO?
I have not been able to find enough usable info on doing this kind of stuff with vb.net.
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
You may want to try implementing a paging grid, or something along those lines if you are pulling a bunch of rows from a table...
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Rafone wrote: Forgive me for cross posting but I'm not getting any answers from the SQL group
Yes you did, I suggested looking at partitioned tables and someone else suggested using replication.
By the read of your post you are going to end up losing all your data. Its not necessary to create other databases, you may want to archive your data to other tables. SQL Server is quite capable (on decent hardware) of handling terrabytes of data.
If you are having performance issues then
Rafone wrote: I have found info on the SQL DMO but because I have 2005 enterprise, 2005 express, 2000 enterprise and MSDE box's I have been trying to do this in pure VB/ADO. Is this valid reasoning for not using SQL DMO?
I have not been able to find enough usable info on doing this kind of stuff with vb.net.
You really do not want to be doing this sort of thing from VB, it should be done directly on the server.
I strongly advise you get someone in who really understands SQL Server to advise you, otherwise it looks to me like you are going to end up in a real mess.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks for the suggestions.
Because of some FDA requirements I am required to give them monthly backups. I have been doing this from the server for the last 5 years. I was and am looking for an automated way of doing this.
Just trying to get some other opinions of how to go about it.
Thanks for the info.
Rafone
PS havn't lost any data yet....
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I've done something similar to what it sounds like what you want to do. I have a logging shipping setup that is running (backups occur every 15 mins, restore 2x a day) to copy changes from the production DB to a secondary DB (meaning the secondary DB matches within a 12 hour window). The production DB is very, very large.
I created an app that allows other developers to create their own test databases to work and test off of. The app dynamically creates a new DB, copies the DB schema over, sets security rights, and then copies the data. Small tables (those under 500 meg) are copied in full. The large tables I have specific queries that limit the amount of data defined by the dev (IE: by default the past 90 days of orders vs all orders in the orders table (but they could do that if they really wanted to)). There are only like 12 tables that are extremely large. The finished test DB is small, but has enough valid data to dev/test with. You could do something similar that limits the data to the past month for the FDA.
Other ideas:
1. You might want to check the Red Gate products. Not sure, but they might have something that could help in this area and save you some headache.
2. Look into logshipping/mirroring and create your own method for extracting the data (copies, bulks, dts, etc).
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
thx for the tip!
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
My Goal: Run a report with a bmp image on it. I want each time I run the report to be able to pull the image in. The name of the image will never change but the image will.
Problem: When I run report the image never changes like crystal reports is saving the original image somewhere, but where?
How do I get crystal reports to grab the new created image file?
Thanks. I am new at Crystal reports.
|
|
|
|
|
If you embed the image in the report from a bmp on the file system, it gets embedded into the RPT file and is not referenced from the file system again.
Storing files (images) in the DB sucks, but you can put the img in the database and have it show up on the report. When the db image changes, the report image changes and you would get the behaviour you want.
|
|
|
|
|
I have found that this is not only a problem with crystal reports with images, but also those that do not have parameters passed to them.
I have got around this in the past by passing the report a datetime value of now. The report when run detects that there is a change and does not cache the data.
I hope this has been helpful.
Regards
|
|
|
|
|
Hi friends it's my first participation in this forom and i hope to find a solution to my problem.
I want to build a program (with c++ or vb or borland c++ or other)
1/this program extract some columns from an excel file A (extension .xls) ,an other B (extension .csv) and file C (extension .dat) to a 4th excel file D(.xls).
2/I will then put file D in a data base.
I'm not good in programmation and i wish that u can help me to do the 1st step of my prog.
i'm waiting your popositions .thank u
|
|
|
|
|
In the following link you can find how to extract data from excel from vb then you can try it for inserting it into excel and then ultimately save it in database.
Extract Excel Data from VB^
|
|
|
|
|
I have make a class tha inherits from a composite control and implements a iscript control to implements a script class with a control then i have put a button inside update panel with a textbox after that i have written a script that handles a change event for a textbox,now the problem when i run the program then when i change the text in textbox it works normal but when i press the buton and try to change the text in textbox the function that handels a change event does not work
in other words it seems no handels for change event
whats the solution for that
with my regards
Aloways go ahead
|
|
|
|
|
|
Well, subject tells everything ...
I can't find what := does in VB.NET ...
Here's one example ...
SwitchDesktop(hDesktop:=p_lngHwnd)
Can anyone tell me ?
thanks
|
|
|
|
|
|
Are you telling me that ":=" is the same as "=" ?
But then why does it exist ?
|
|
|
|
|
This might be able to help you[^]. It is also possible that, that is VB6 syntax.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Sorry, couldn't find ":=" at that link. But thanks
And I don't know if it existed in VB6 ...
|
|
|
|