|
I have found that I can run a query using Access query builder works fine but the same query does not work in the "TableAdapter Query Configuration Wizard". Why is this? How can I get this to work?
Example:
SELECT * from Rental_Agreement
WHERE DateSerial(year(end_date), month(end_date) , day(end_date) - 5) = Date()
This works in Acess 2003 but not in the "TableAdapter Query Configuration Wizard".
"The things that will destroy us are: politics without principle; pleasure without conscience; wealth without work; knowledge without character; business without morality; science without humanity; and worship without sacrifice."
-Mahatma Gandhi (1869-1948)
|
|
|
|
|
The difference is that in your Access query, you're using VBA functions to supply certain items (like Date() and DateSerial()). Since these functions don't exist in SQL, you can't use them in the TableAdapter Query Wizard.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
pls... help me in this program i am new in this programming language.....
asa
|
|
|
|
|
Can you explain in a bit more detail?
Give an example of what you are trying to do...
Steve
|
|
|
|
|
for example you input 35 the it will convert that to word thirty five, 1,000,000 one million, 355,000 three hundred fifty five thousand.... can you help me???
asa
|
|
|
|
|
|
This reeks of a homework assignment.
All you have to do is Google for "convert number into words" and you'll come up with all kinds of algorithms to do this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using CreateObject("MSXML2.XMLHTTP.3.0") in A VBScript, which calls open(), send() etc to check the status of a URL.
The CreateObject() call and all the calls to the object are inside a loop.
The problem I am having is, the status information is getting cached. If the web server is up, and the script gets an HTTP 200 status, then it will always report a 200 status on each following iteration, even when I stop the web server. The problem seems to be caused by the fact that the call is being done from the same process (cscript.exe). If I stop and re-run the script with the web server down, it of course reports the failure.
Does anyone know a way to clear the state so that this web client gets the latest status each time?
cheers,
Neil
|
|
|
|
|
Hello
How van i get the type of the variable stored in an array as objects
i mean it's charactere, numeric or alphabetic.
and thanks in advance
Assaf
|
|
|
|
|
Can you explain in a bit more detail?
What code do you have so far?
Steve
|
|
|
|
|
Dim PassCheck() As Object
y = TextBox2.Text
ReDim PassCheck(y.Length)
For i = 0 To y.Length - 1
PassCheck(i) = Mid(y, i + 1, i + 1)
.
.
.
.
and now i want to get each type of the variable stored in the array
to differ numeric, charactere,and alphabetic.
Thanks.
Assaf
|
|
|
|
|
You could loop through the array and use the following functions to check each character:
If you start with a character array:
Char.IsNumber(character)
Char.IsDigit(character)
Char.IsLetter(character)
Char.IsLetterOrDigit(character)
If all you want to do is check the contents of a string, loop the characters of the string and check using one of above. You don't have to put the characters in an array to do this.
What is the purpose of this?
Steve
|
|
|
|
|
Hi all,
I'm not too sure if this is possible, but any feedback at all would be much appreciated. I would like to have a datagrid where the first row acts as a filter. So, just under each heading you would have a combo-box that can filter that column.
I've searched the net for code or components that can do this and haven't found anything. Does anyone have any ideas regarding this issue?
Thanks in advance,
|
|
|
|
|
I don't think you can do that with a standard DataGrid.
You may be able to purchase a custom DataGrid control that has this functionality. There are many such components on the Internet but they are often quite expensive!
Simple solution would be to add filtering combo's above the grid or use a Master/Detail grid configuration.
Steve
|
|
|
|
|
Thanks Steve,
The combos above the grid is how we are doing it at the moment. Was just wondering if there was a way to have the filters embedded in the grid.
|
|
|
|
|
Can't be done inside the grid the way you described.
You might want to explore the possibility of adding this functionality to the DataGridView's Headers though. It sounds like you already have the bulk of the code written using ComboBox's.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
have a look at one of my articles[^]. It is not integrated into the first row but can be integrated intro the caption and handles proper resizing so it looks like its fully integrated.
Robert
|
|
|
|
|
Hi,
Thanks to everyone for their replies. I'll download that version alright and try and get it working for our project. I might have a question or 2 later on.
Thanks again,
|
|
|
|
|
Hi Robert,
I was looking at your sample and it seems to work as I would like it. My project is in VB. I was wondering do you know the code in VB to link to your Grid View. I'm looking in particular at the ExtenderSample. If you don't have it thats fine, just thought I would ask.
The specific line I'm having problems with is:
(_extender.FilterFactory as GridViewExtensions.GridFilterFactories.DefaultGridFilterFactory).CreateDistinctGridFilters = true;
I can't seem to write this in VB .net.
Any help would be much appreciated, thanks again for the code.
|
|
|
|
|
Hi,
I'm not really a VB.Net programmer but I think CType is used there for castings.
You could also create a new instance of the filter factory (this would even be more typesafe):
Dim factory as GridViewExtensions.GridFilterFactories.DefaultGridFilterFactory
factory = New GridViewExtensions.GridFilterFactories.DefaultGridFilterFactory()
factory.CreateDistinctGridFilters = True
_extender.FilterFactory = factory
|
|
|
|
|
Hi Robert,
Thanks again for your help. I'm still not quite there. Just a textbox appearing where the filters should be. I feel I'm close, when I put a watch on the _extender it seems to be filling up with data.
Do you if people have had this working for VB without any problems?
Thanks again,
|
|
|
|
|
Hi Robert,
Another quick question (you must be sick of me at this stage) but does your code only use datasets? I using bind to objects.
|
|
|
|
|
daveryan78 wrote: you must be sick of me at this stage
I'm not getting sick so quickly .
daveryan78 wrote: does your code only use datasets? I using bind to objects.
Well you should have read the article more carefully. Yes the extender only works in conjunction with DataView, DataTable or DataSet. This is simply because I'm using some of the internal functionalities of those classes.
Maybe filling your objects from a collection into a DataTable might work for you.
|
|
|
|
|
Hi @all
I was looking around for a solution but i cant find anyone.
The point is, i want to make a list with the Tables inside of a specified mdb file.
Is there a way to read the table structure of an Access mdb?
Greetings
poOkie
|
|
|
|
|
I don't know the answer to your question but you will need to examine the TableDefs collection (DAO) of the database somehow.
Each database has a TableDefs collection. This contains a TableDef (DAO) for each table that exposes properties of each table.
Steve
|
|
|
|