|
Depending on your data source e.g. SQL; you will need to apply suitable wild cards depending on how you want to search.
You need to prefix and/or suffix the query text with a % or an *
|
|
|
|
|
Member 4420534 wrote: the grid is empty and stays empty
ColName LIKE '*test'
I are Troll
|
|
|
|
|
I hope I posted in the correct forum, as I did not see a VBA forum. My apologies if not.
I am needing to solve a problem for a couple of coworkers. They have a workbook where several sheets are being utilized. The first sheet is a form, the second keeps track of each time the form is filled out. To keep the original form, I was planning on having a database to hold the information on the second sheet that both offices could have access.
The problem is that I have never passed parameters to a sql statement in VBA and never wrote to a database with an UPDATE statement in VBA. I've googled a bit about the subject but did not get any relevant results.
So I came here, hoping someone would have some experience with this.
Any help is appreciated.
Jude
|
|
|
|
|
Hi,
My program searches for youtube videos but somehow the returned atomfeed is incomplete
e.g if I search for "Star Trek Voyager, deutsch, Translokalisation" , I only got one result out of > 5 but if I search for other videos everything is fine...
My code:
Dim query As New YouTubeQuery(YouTubeQuery.DefaultVideoUri)
Dim Service As New YouTubeService("youtube")
query.OrderBy = "relevance"
query.Query = Name '<- "My key word"
query.NumberToRetrieve = 50
query.SafeSearch = YouTubeQuery.SafeSearchValues.None
Dim VideoFeed = Service.Query(query)
Of course you need the Google API...
Has anybody an idea?
|
|
|
|
|
I tried your keywords on the youtube-site, with this result;
"Star Trek Voyager, deutsch, Translokalisation" results 1 - 1 of about 1
It could be filtered out by SafeSearch;
The safeSearch parameter indicates whether the search results should include restricted content as well as standard content. YouTube will determine whether content is restricted based on the user's IP address or location,
..then there's this note at the bottom, saying;
Some search results have been omitted that contain duplicates. If you like,
you can repeat the search with the omitted results included
It's using a hyperlink with the original question and querystring-parameters, with the addition of the one below
&search_filter=0
I are Troll
|
|
|
|
|
Thanks,
And sorry for my late answer. I was quite busy
|
|
|
|
|
I have a database that contains plot coordinates, so I load this data in to my program and generate a Bitmap of the plots. So far so good.
I now need to print the resulting Bitmap on a RDLC report, so to achieve this I have created a strong;y type dataset to contain the required text based data plus a column PlotImage as a System.Object type column.
I've then created a report, and add Text Fields for the Text based data and an Image control for the plot bitmap. I have also the the EnableExternalImages property to True
When I run the report all the text data is showing, but the Image is not.
Any ideas?
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
modified on Wednesday, July 28, 2010 11:35 AM
|
|
|
|
|
Assuming the image is not in the database and is external and not embedded you would need to set the expression on the rdlc to something like this
="file:///"Fields!Photo.Value
Also, refresh the report after setting external images to true this is on the reportviewer frm)
ReportViewer1.LocalReport.EnableExternalImages = True
Me.YourTableAdapter.Fill(Me.Shx_Dataset.table)
If Frmmyfrm.lblPhotoFileBefore.Text "" Then
Try
Frmmyfrm.Photo.Image = Image.FromFile(Frmmyfrm.lblPhotoFileBefore.Text)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error Loading Photo", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Else
Frmmyfrm.Photo.Image = Nothing
End If
Me.ReportViewer1.RefreshReport()
End Sub
BTW, pdf's do not seem to like bitmaps so if you try to export to a PDF, don't be surprised if you see the dreaded red X...use jpg's.
|
|
|
|
|
mindserve wrote: Assuming the image is not in the database
I had actually stored the image in a DataTable, but after further investigate, I believe that the image needs to be MIME Encoded first.
As a alternative solution, I have tried saving the image as a file in the TEMP folder and using the example provided. It works well, Thanks.
mindserve wrote: BTW, pdf's do not seem to like bitmaps so if you try to export to a PDF, don't be surprised if you see the dreaded red X...use jpg's.
Thanks for the advice, it will save me alot time. Thanks again.
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
|
|
|
|
|
Hi Folks,
Just wondering if anyone could help me with this issue, all works fine on Dev and Testing machines and in some of our client sites just 1 or 2 cauing this issue:
"Run Time Error -2147023782 (8007045a):
a dynamic link library (DLL) initialization routine failed"
it appears to be on this line based on logging:
objconn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & m_strPath & ";Extended Properties=dBASE IV;" & _
"User ID=;Password="
m_strPath is C:\MyDbfs.
Anyone seen this issue before?
TIA
|
|
|
|
|
I would take a guess and say that either the database in question is not a dbase IV database, or Jet needs to be updated. You can start with this[^] and then here[^] to find the Jet SP8 update for your customers O/S.
I've never seen the problem before because I haven't used dBase since, oh, 1985.
|
|
|
|
|
Hi Dave,
I have tried your suggestions but i am still encountering the same issue, any other thoughts?
TIA
|
|
|
|
|
Nope. The only other thing is to check the integrity of the databases themselves.
|
|
|
|
|
I need to return the index of a TABLE Row after filtering with a DataView. I don't want the DataView index, just the index of the row in the TABLE that it relates too.
Can this be done and if so how?
Thanks
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
|
|
|
|
|
Your question does not make sense. First of all, what does database index gives you? what if the db index changed, say if an item is deleted? Then you want to get at it when the DataView is filtered? Well entry are you talking about? What if the dataview has many items?
Here is what you can think off, add a hidden column to you DataView. Then save the the primary key of your db table in the hidden column. Now when you select a row of the dataview, get the hidden column and retrieve the primary key. Given the primary key you can query for the item in your db table.
Just my 2cents
|
|
|
|
|
Hi,
using VB 2008, I Have a dataview which is the contents of a datatable.
dv.RowFilter = "address like '*" & postcode & "'"
this works great for postcode like OX7 5DF but i need to be able to do searches for part postcodes for example OX7
has anybody any pointers to how to do this or any great example sites?
Thanks
Simon
As barmey as a sack of badgers
|
|
|
|
|
Simon_Whale wrote: dv.RowFilter = "address like '*" & postcode & "'"
change your query to
dv.RowFilter = "address like '%" & postcode & "%'"
|
|
|
|
|
This is trivial and you already have to code to do it. You would normally just put an asterisk before AND AFTER the postcode.
dv.RowFilter = String.Format("address LIKE '*{0}*'", postcode)
|
|
|
|
|
Hey guys can anybody help!!!
how to i create application in vb6 so that when i m installing, it will ask the path of the database either created in access or sql in a network.
|
|
|
|
|
You start by getting out of the dark ages (VB6) and moving up to VB.NET. VB6 has been unsupported and a dead environment for quite some time now.
If you're going to support Access and SQL Server, you'd probably want to look into using Entity Framework or equivilent to make your life easier.
Asking for the path to an Access database is trivial. Asking for an SQL Server to use is a bit more complicated. But, you'd usually set something like this up in the app's installer.
|
|
|
|
|
Sorry but I disagree with that, VB6 may be unsupported but it certainly isn't dead and I suspect there may be more people using it for development, or at least maintenance, than there are using VB2008
Maybe I am sensitive as I also still develop in VB6. I would upgrade the existing code if only it was more straight forward to do so
In answer to the original poster
The client in my system keeps a record of the last server it logged in to in a local file and if it doesn't have the file (a new installation) it allows the user to enter the name of the server and then saves it on a successful connection and on subsequent executions it shows what it used last time and the user is only required to put it in once
Not quite what you were asking for but hopefully helpful
|
|
|
|
|
Mike Deeks wrote: Sorry but I disagree with that, VB6 may be unsupported but it certainly isn't dead
It just hasn't fallen in the grave yet, but it's standing at the edge, clutching it's chest, just like it should be.
Mike Deeks wrote: I suspect there may be more people using it for development, or at least maintenance, than there are using VB2008
Probably true. That still doesn't change the fact that starting any new development in VB6 is a complete waste of time and resources. Microsoft is killing the runtime off from any future versions of Windows. Sure, the runtime may still work, but only by chance, not by choice.
Kill it. Kill it. Kill it. I don't want to here a bunch of whiny people complain that their apps don't work any more like there was when Vista came out. VB.NET came out 10 years ago. There's no longer any excuse for continuing to cultivate old technology that has LONG since been replaced.
|
|
|
|
|
Hmmmmm 10 years ago, and still people are using it, VB6 must be really good
Or maybe it is because there was no straight forward way to take projects consisting of many thousands of lines of code and expect it to work in the .net environment without a significant amount of testing and change
At least with Office 2010 I can still open and use virtually any document that has been constructed in the previous versions
I am interested to hear that there is a strategy to stop people from using programs that were developed too long ago, I must have missed the "best before" date on the packaging.
As there is no excuse I will try not to whine too loudly about it especially where you might hear...
|
|
|
|
|
Mike Deeks wrote: I must have missed the "best before" date on the packaging
You did. The runtime wasn't supported on Vista until a bunch of people started crying about it. MS went through a bunch of pain to get it to work on Vista. Since 7 came out pretty quick to replace the debacle that was Vista, 7 also supports the runtime. But that's as far as it's going. There will be no VB6 runtime support in Windows 8 (or whatever it's called). Good luck keeping your VB6 apps working.
|
|
|
|
|
Hi
Im totally confused with Assembly Version vs Publish version.
I have a windows application.I use a SetupProject --> rebuild it --> ,I get the MSI file and Install.
I am trying to do a Auto Update on the application and would probably have to play with the version numbers in order to do this.
My 1st problem is, when I change the applications assembly version and install the new msi - I get an error that there is already a application installed with the same version, but when I change the publish version it uninstalls the installed app and install the new one.
My 2nd problem is I dont really know the best way to check if a new version is available.
My idea is to take the running apps version and compare it with the version of the msi file on the server.If they are not the same, it will popup a message on the application saying "A new version is available, please click yes to install the new version"
What I want to know:
1.How do I get the application to work on the assembly version and not the publish.
2.I would really appreciate tips what is the best way to write an auto update check.
Thank you everyone
|
|
|
|