PDA

Click to See Complete Forum and Search --> : VB6 appl with calendar ctl deployment problem on vista


ayyazm64
Dec 22nd, 2008, 05:44 AM
Hi,
I have an VB6 appl using calendar control on different forms.I have a form which has two calendar controls. when this appl is installed on vista and when run the appl the form which has two calender controls does not displays one calendar control properly(cells are enlarged with no dates in them) while
the other calendar control is displayed ok.
anybody knows whats going around.
Ayyaz

si_the_geek
Dec 22nd, 2008, 08:51 AM
Welcome to VBForums :wave:

The problem is that the Calendar control is explicitly not for use in VB - it is only for use within Office applications, and you are not allowed to distribute it with your VB program.

For more information on that, and alternative controls you can use, see the article What controls can I use to input a date/time? from our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)

ayyazm64
Dec 22nd, 2008, 11:30 PM
Thanks SI.
But the thing is, i have forms in the same appl which have one calendar control,it works fine there, but when two calendar controls are placed, one of them doesn't display properly.
When this appl is installed on XP it works fine.
Ayyaz

si_the_geek
Dec 23rd, 2008, 09:52 AM
That kind of thing is a common issue with the Calendar control, and it is purely luck if it seems to work correctly at all - if you run it on another computer, you might find that none of them display properly, or that all of them do; you may also find that it works one day but not the next.

If you want it to always work, use a different control.

ayyazm64
Dec 24th, 2008, 05:56 AM
THanks SI.
Now i have placed a Monthview control instead of calendar but when we click
on it means select a date and then click on an OK button,with first click the button takes focus and the second click clicks the button.
With calendar there was no such problem.

si_the_geek
Dec 24th, 2008, 09:41 AM
So it does... one way to deal with that is to send the focus somewhere else when a date is clicked. In this example I used a command button, but it should work with any control:
Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
Command1.SetFocus
End Sub

ayyazm64
Dec 26th, 2008, 12:03 AM
I dealt this problem the same way you suggested but i think this is a kind of bug in monthview control.Did somebody reported it to Microsoft and did they
fixed it and is there any patch available.

si_the_geek
Dec 27th, 2008, 04:21 AM
I've got SP6 installed, and I get the error too - and as VB6 is now out of its support phase, there will not be any more service packs to fix it (only hotfixes for very major issues).

There may be an article about it on Microsoft.com (add MSKB to any searches you do) that explains a solution, but if not I think you are stuck with that behaviour.

ayyazm64
Dec 27th, 2008, 06:05 AM
I have designed a database in MS Access.My VB6 appl accesses this database.It works fine when the db file is placed on the same machine where the appl is(i am using ODBC).But when i install the appl on other machine while
the database is still on my machine, it works ok(when reading the data) but when try to update the data it gives error like object or database is readonly.
I have configured the DSN on the machine where the appl is running.
I have no passwords on the database.I have given all the permissions for the tables for users group.
what should i do.

si_the_geek
Dec 27th, 2008, 06:16 AM
You need to make sure that the .mdb file itself (and the folder it is in) can be written to.

For more information, see the article How do I use an Access database from multiple computers (in a network)? from our Database Development FAQs/Tutorials (at the top of the Database Development forum)

ayyazm64
Dec 31st, 2008, 01:14 AM
Hi Si,
I am using in my vb6 appl DSN(ODBC,system DSN) to access MS ACCESS database.when i am creating a setup package using PDW i included the database file but when i install my appl on client's machine, i need to configure DSN manually on client's machine.
is there any way that when setup is run on client machine to install the appl,it configures the DSN also.

si_the_geek
Dec 31st, 2008, 05:11 AM
Is there a particular reason that you need to use a DSN?

If not, it is better to put the details for it into a connection string in your program instead - it saves the setup issues, and means that it can't be accidentally edited/deleted by the users.

To see what kind of thing you need for that, see the connection strings link in my signature.

ayyazm64
Jan 21st, 2009, 05:14 AM
Hi Si,
in database a field is number and default value is null. This record is retrieved in MS datagird.I wanna check whether the corresponding col in datagrid is null or not. When i use ISNULL function it gives me type mismatch error.
I used isempty function, the same result. Is there any way to check datagrid cellvalue.
Ayyaz

si_the_geek
Jan 21st, 2009, 08:06 AM
The IsNull function is the one you want, but I've got no idea how to use it with the DataGrid (or even if you can), because I don't use the DataGrid.

As that question is a very different topic to the one at the start of this thread, it should really be in a different thread, so you should re-post it as a New Thread in our [url=http://www.vbforums.com/forumdisplay.php?f=3]Database Development forum[/i]. Make sure that you mention that you are using VB6, and what method you are using to connect to the database (eg: ADO code/DAO control/...)