Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts

Friday, March 30, 2012

MSDE access over network slow for XP workstations, not Win2K

I've installed MSDE SP3a on a Windows 2000 Server, and the VB6 client
application on multiple workstations.
These workstations are either Win2000 Pro or WinXP Pro (both SP1 and SP2).
All workstations can access and ping the server under 1MS.
When the client application opens and reads data from the database server,
it takes a short time for this to be performed on the Win2000 Pro machines,
but all the XP machines take an abnormally long time to connect and to
retrieve the data.
The XP's do connect, but the retrieval is very slow, sometimes it timesout
during a retrieval.
This occurs even when nobody is connected to the database, so I've ruled out
the governer.
I'm using ADO to connect and all PC's have MDAC 2.7 or greater.
The install process only installed MDAC 2.7 if the current version is before
that.
Anybody have an idea what might be the problem?
All responses are welcome.
TIA
Jim K
Hi Jim,
Name resolution problems perhaps? Try connecting to the IP address instead
of the server name to find out.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Jim K" <krusej@.megsinet.net> wrote in message
news:enMo6BQ7EHA.1596@.tk2msftngp13.phx.gbl...
> I've installed MSDE SP3a on a Windows 2000 Server, and the VB6 client
> application on multiple workstations.
> These workstations are either Win2000 Pro or WinXP Pro (both SP1 and SP2).
> All workstations can access and ping the server under 1MS.
> When the client application opens and reads data from the database server,
> it takes a short time for this to be performed on the Win2000 Pro
> machines,
> but all the XP machines take an abnormally long time to connect and to
> retrieve the data.
> The XP's do connect, but the retrieval is very slow, sometimes it timesout
> during a retrieval.
> This occurs even when nobody is connected to the database, so I've ruled
> out
> the governer.
> I'm using ADO to connect and all PC's have MDAC 2.7 or greater.
> The install process only installed MDAC 2.7 if the current version is
> before
> that.
> Anybody have an idea what might be the problem?
> All responses are welcome.
> TIA
> Jim K
>
|||Thanks, I didn't think of that.
I have connected using the IP in other apps, but that was to the default
instance.
Since I have a named instance in this case, how would I format the IP and
instance?
Ex: default instance installed on server SERVER1, I can substitute the IP
for SERVER1
for named instance SERVER1/DB1, how would I format the IP? IP#/DB1 ?
Thanks!
"Greg Low [MVP]" <greglow@.lowell.com.au> wrote in message
news:u0zukkl7EHA.3124@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Hi Jim,
> Name resolution problems perhaps? Try connecting to the IP address instead
> of the server name to find out.
> HTH,
> --
> Greg Low [MVP]
> MSDE Manager SQL Tools
> www.whitebearconsulting.com
> "Jim K" <krusej@.megsinet.net> wrote in message
> news:enMo6BQ7EHA.1596@.tk2msftngp13.phx.gbl...
SP2).[vbcol=seagreen]
server,[vbcol=seagreen]
timesout
>
|||Hi Jim,
I'd suggest setting a fixed port for the named instance, then just connect
to that port. Even set up an alias on the client boxes that knows about the
port. It would completely avoid the sql browser function that essentially
just maps your instance name to a port anyway. To do that:
1. Open svrnetcn.exe and for the named instance, uncheck the "dynamic port"
box and select your own port (ie 38474 or something).
2. Restart the instance.
3. On the client, run cliconfg.exe and set up an alias pointing to that port
on the server.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Jim K" <krusej@.megsinet.net> wrote in message
news:u6vH8Mo7EHA.2196@.TK2MSFTNGP11.phx.gbl...
> Thanks, I didn't think of that.
> I have connected using the IP in other apps, but that was to the default
> instance.
> Since I have a named instance in this case, how would I format the IP and
> instance?
> Ex: default instance installed on server SERVER1, I can substitute the
> IP
> for SERVER1
> for named instance SERVER1/DB1, how would I format the IP? IP#/DB1 ?
> Thanks!
> "Greg Low [MVP]" <greglow@.lowell.com.au> wrote in message
> news:u0zukkl7EHA.3124@.TK2MSFTNGP11.phx.gbl...
> SP2).
> server,
> timesout
>
sql

Wednesday, March 28, 2012

MSDE 2000A inner join problems

Hi All
I am using VB6 and MSDE 2000
I previously used Access 2000 and used the following ado sql to create a
temp table in access
(Invoice table contains Invoice data such as Invoice number, date etc.
Idetail table contains details of the invoice individual items e.g product
code, Invoice Number etc) The link is the Invoice Number field in each table
(Master/Detail)
sql = "SELECT idetail.qty, idetail.prod_code, invoice.inv_date,
idetail.price INTO idetailtemp IN '" & App.path & "\data\tramcarstemp.mdb'
FROM idetail inner join [invoice] on idetail.inv_num = invoice.inv_num where
invoice.inv_date between #" & Format(DT1.Value, "m-d-yyyy") & "# and #" &
Format(DT2.Value, "m-d-yyyy") & "#"
cn.execute sql
This worked fine in Access 2000
I am upgrading to MSDE2000 and using the following code in TSql
Private Sub maketable()
Dim a, fso As New FileSystemObject
Dim x As Integer
Set a = fso.CreateTextFile(App.path & "\sql\BackupTramcars.sql", True)
a.WriteLine ("EXEC sp_dboption 'Tramcars', 'select into/bulkcopy', 'true'")
a.WriteLine ("GO")
a.WriteLine ("USE " & "Tramcars")
a.WriteLine ("SELECT idetail.qty, idetail.prod_code, invoice.inv_date,
idetail.price INTO idetailtemp")
a.WriteLine ("FROM idetail inner join [invoice] on idetail.inv_num =
invoice.inv_num")
a.WriteLine ("where invoice.inv_date between '" &
Format(frmorderhistory.DT1.Value, "m-d-yyyy") & "' and '" &
Format(frmorderhistory.DT2.Value, "m-d-yyyy") & "'")
a.WriteLine ("GO")
a.WriteLine ("EXEC sp_dboption 'Tramcars', 'select into/bulkcopy', 'false'")
a.WriteLine ("GO")
a.Close
Set a = Nothing
End Sub
The table is created but the inserted invoice dates are only ever 1 of 2
dates
Also when I read from the table to graph the data with
sql = "Select inv_date, sum(qty) as amount from [idetailtemp] where
[prod_code] = '" &
frmorderhistory.maingrid.TextMatrix(frmorderhistor y.maingrid.Row, 0) & "'
group by [inv_date]"
rs.Open sql, cn, adOpenDynamic, adLockReadOnly
There are several records in the recordset but calling rs.recordcount = -1,
which didn't happen in Access 2K
Any ideas
Steve
hi Steve,
steve wrote:
> Hi All
> ...
> Private Sub maketable()
> Dim a, fso As New FileSystemObject
> Dim x As Integer
> Set a = fso.CreateTextFile(App.path & "\sql\BackupTramcars.sql", True)
> a.WriteLine ("EXEC sp_dboption 'Tramcars', 'select into/bulkcopy',
> 'true'") a.WriteLine ("GO")
> a.WriteLine ("USE " & "Tramcars")
> a.WriteLine ("SELECT idetail.qty, idetail.prod_code, invoice.inv_date,
> idetail.price INTO idetailtemp")
> a.WriteLine ("FROM idetail inner join [invoice] on idetail.inv_num =
> invoice.inv_num")
> a.WriteLine ("where invoice.inv_date between '" &
> Format(frmorderhistory.DT1.Value, "m-d-yyyy") & "' and '" &
> Format(frmorderhistory.DT2.Value, "m-d-yyyy") & "'")
> a.WriteLine ("GO")
> a.WriteLine ("EXEC sp_dboption 'Tramcars', 'select into/bulkcopy',
> 'false'") a.WriteLine ("GO")
> a.Close
>
> The table is created but the inserted invoice dates are only ever 1
> of 2 dates
please use the ISO format when referencing dates... dates can be confusing,
but if you refer to them in the 'YYYYMMDD' or 'YYYY-MM-DD' format you will
be out of troubles.. please have a look at
http://www.windowsitpro.com/SQLServe...9147/9147.html ,
http://www.karaszi.com/SQLServer/info_datetime.asp for further info..

> Also when I read from the table to graph the data with
> sql = "Select inv_date, sum(qty) as amount from [idetailtemp] where
> [prod_code] = '" &
> frmorderhistory.maingrid.TextMatrix(frmorderhistor y.maingrid.Row, 0)
> & "' group by [inv_date]"
> rs.Open sql, cn, adOpenDynamic, adLockReadOnly
> There are several records in the recordset but calling rs.recordcount
> = -1, which didn't happen in Access 2K
this depends on the MDAC recordset type... the recordcount value will be
available when the recordset has been fully populated, that's to say as soon
as you perform a .MoveLast operation.. (BTW... .Movelast can be time
consuming as all rows must be fetched and transferred)..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Andrea
Thanks. Worked a treat
Steve
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3k76maFt35b8U1@.individual.net...
> hi Steve,
> steve wrote:
> please use the ISO format when referencing dates... dates can be
> confusing, but if you refer to them in the 'YYYYMMDD' or 'YYYY-MM-DD'
> format you will be out of troubles.. please have a look at
> http://www.windowsitpro.com/SQLServe...9147/9147.html ,
> http://www.karaszi.com/SQLServer/info_datetime.asp for further info..
>
> this depends on the MDAC recordset type... the recordcount value will be
> available when the recordset has been fully populated, that's to say as
> soon as you perform a .MoveLast operation.. (BTW... .Movelast can be time
> consuming as all rows must be fetched and transferred)..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

MSDE 2000a Deployment Issues

I need to deploy MSDE 2000a with a custom app built in VB6. I found the
setup package to add MSDE 1.0 through the Package & Deployment Wizard, but
the link I found for MSDE 2000 goes to the same article as 1.0. I've also
seen a lot of info on using merge modules to deploy MSDE 2000, but I'm
clueless about them. What is the best (and hopefully easiest) way to deploy
MSDE 2000 with a custom app built with VB6 using the Package & Deployment
Wizard? Any help would be greatly appreciated.
My advice is don't.
Package the setup program from MS, configure the setup.ini file the way you
want it and get the user to run it. Every other option seems to end up in
pain at present. Much better story coming for SQL Express.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"pbb" <pbb@.discussions.microsoft.com> wrote in message
news:DDFFD02B-301D-4273-B32B-D6CCFAB50A76@.microsoft.com...
>I need to deploy MSDE 2000a with a custom app built in VB6. I found the
> setup package to add MSDE 1.0 through the Package & Deployment Wizard, but
> the link I found for MSDE 2000 goes to the same article as 1.0. I've also
> seen a lot of info on using merge modules to deploy MSDE 2000, but I'm
> clueless about them. What is the best (and hopefully easiest) way to
> deploy
> MSDE 2000 with a custom app built with VB6 using the Package & Deployment
> Wizard? Any help would be greatly appreciated.
|||Okay, so it sounds like what you're saying is that it's best to include 2
setup programs? First have the user run the setup.exe that comes with MSDE
(with the customized ini file), and then have them run the setup package for
the custom app?
"Greg Low [MVP]" wrote:

> My advice is don't.
> Package the setup program from MS, configure the setup.ini file the way you
> want it and get the user to run it. Every other option seems to end up in
> pain at present. Much better story coming for SQL Express.
> HTH,
> --
> Greg Low [MVP]
> MSDE Manager SQL Tools
> www.whitebearconsulting.com
> "pbb" <pbb@.discussions.microsoft.com> wrote in message
> news:DDFFD02B-301D-4273-B32B-D6CCFAB50A76@.microsoft.com...
>
>
|||Yep
"pbb" <pbb@.discussions.microsoft.com> wrote in message
news:4203C438-9A56-48F0-B36D-22793F26F4AD@.microsoft.com...[vbcol=seagreen]
> Okay, so it sounds like what you're saying is that it's best to include 2
> setup programs? First have the user run the setup.exe that comes with
> MSDE
> (with the customized ini file), and then have them run the setup package
> for
> the custom app?
> "Greg Low [MVP]" wrote: