I have created an application using VB6. The application uses MSDE to
access data. How do I include the required database with the installation
package.
Daniel
In the package & deployment wizard, include it in the "other files" listing
you get to complete as part of creating the setup package.
Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:#WXyl04REHA.3124@.TK2MSFTNGP12.phx.gbl...
: I have created an application using VB6. The application uses MSDE to
: access data. How do I include the required database with the installation
: package.
:
: Daniel
:
:
|||Are you saying that a database in MSDE is saved on the drive as an actual
file?
Daniel
"Randy Birch" <rgb_removethis@.mvps.org> wrote in message
news:uxkYY84REHA.3016@.tk2msftngp13.phx.gbl...
> In the package & deployment wizard, include it in the "other files"
listing
> you get to complete as part of creating the setup package.
> --
> Randy Birch
> MVP Visual Basic
> http://vbnet.mvps.org/
> Please respond only to the newsgroups so all can benefit.
>
> "Daniel" <dwbnews@.hotmail.com> wrote in message
> news:#WXyl04REHA.3124@.TK2MSFTNGP12.phx.gbl...
> : I have created an application using VB6. The application uses MSDE to
> : access data. How do I include the required database with the
installation
> : package.
> :
> : Daniel
> :
> :
>
|||MSDE is SQL Server, and for each database in SQL Server, you have at least two files, a primary database file
(typically .mdf) and at least one transaction log file (typically .ldf). You can detach the files, ship them
with your app and after msde is installed attach them again. Read about sp_detach_db and sp_attach_db i Books
Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Daniel" <dwbnews@.hotmail.com> wrote in message news:%23aKOEJ5REHA.3628@.TK2MSFTNGP12.phx.gbl...
> Are you saying that a database in MSDE is saved on the drive as an actual
> file?
> Daniel
> "Randy Birch" <rgb_removethis@.mvps.org> wrote in message
> news:uxkYY84REHA.3016@.tk2msftngp13.phx.gbl...
> listing
> installation
>
|||Hi Daniel
Also check out:
http://support.microsoft.com/default...-us;Q314546#10
John
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:%23aKOEJ5REHA.3628@.TK2MSFTNGP12.phx.gbl...
> Are you saying that a database in MSDE is saved on the drive as an actual
> file?
> Daniel
> "Randy Birch" <rgb_removethis@.mvps.org> wrote in message
> news:uxkYY84REHA.3016@.tk2msftngp13.phx.gbl...
> listing
> installation
>
|||Sorry ... my error ... I read MSDE and thought Access MDB. I didn't see the
cross-post to the sqlserver groups.
Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:#aKOEJ5REHA.3628@.TK2MSFTNGP12.phx.gbl...
: Are you saying that a database in MSDE is saved on the drive as an actual
: file?
:
: Daniel
:
: "Randy Birch" <rgb_removethis@.mvps.org> wrote in message
: news:uxkYY84REHA.3016@.tk2msftngp13.phx.gbl...
: > In the package & deployment wizard, include it in the "other files"
: listing
: > you get to complete as part of creating the setup package.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "Daniel" <dwbnews@.hotmail.com> wrote in message
: > news:#WXyl04REHA.3124@.TK2MSFTNGP12.phx.gbl...
: > : I have created an application using VB6. The application uses MSDE to
: > : access data. How do I include the required database with the
: installation
: > : package.
: > :
: > : Daniel
: > :
: > :
: >
:
:
Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts
Wednesday, March 21, 2012
How to include data from 2 unlinked tables
I am using VB6 and CR10 & SQL Server 7
I am working on an inventory project nw.. I'm new to crystal reports..
For the report i need to pick data from 2 tables(Sales_Details, Purchase_Details)
There is no link between these 2 tables (except a similarity that both have got a date field)
TABLE 1
Sale_Date... SalesQty
01/01/07...... 50
01/03/07...... 24
01/04/07...... 10
TABLE 2
Purch_Date... Purchase Qty
01/01/07 ....... 100
01/06/07 ....... 100
I need to take a report which shows the movement of a particular Item based on date range
It should look like this
------x----x----x
Date ......... Sales.......Purchase
------x----x----x
01/01/07 ........ 50 ........ 100
01/03/07 ........ 24 ........ 0
01/04/07 ........ 10 ........ 0
01/06/07 ........ 0 ........ 100
--------------
I tried inner and outer joins to links these tables, but all in vein( data is getting repeated then), tried with groups also..no use
Pleeeaaase... help me to do this...
This may be a simple issue for most of you...
But i am a beginner.. i need your valuable help..
Plzzzzz...Just to make sure, but there are no PKeys in either one of your tables?|||You say you need to report by item, so surely there must be some sort of item code in both tables otherwise how do you know what item you're buying / selling?|||Ofcourse item code is there... For sake of simplicity i dint mention that.
Actually both the purchase and sales table has the fileds- Date, Itemcode, Quantity
Sales Table
Date...... ItemCode........Qnty
------------
01/01/07 ..A001............50
01/03/07...A001............24
01/04/07...A001............10
Purchase Table
Date...... ItemCode........Qnty
------------
01/01/07...A001............100
01/06/07...A001............100
and i need a report (like the one mentioned above)based on the movement of Item -A001 ..
Please...........|||First:
You wrote:
There is no link between these 2 tables (except a similarity that both have got a date field)
This is the reason for the questions now I assume itemcode is your link.
Next you will group by date and itemcode if you want, now for grouping by date go to options and choose section to be printed by day.
Then you will need to create formulas that will check to see the quantity of sales and purchases.
Something like:
If {Sales.quantity} > 0
Then {Sales.quantity}
Else 0
Hope that helps,
GJ
I am working on an inventory project nw.. I'm new to crystal reports..
For the report i need to pick data from 2 tables(Sales_Details, Purchase_Details)
There is no link between these 2 tables (except a similarity that both have got a date field)
TABLE 1
Sale_Date... SalesQty
01/01/07...... 50
01/03/07...... 24
01/04/07...... 10
TABLE 2
Purch_Date... Purchase Qty
01/01/07 ....... 100
01/06/07 ....... 100
I need to take a report which shows the movement of a particular Item based on date range
It should look like this
------x----x----x
Date ......... Sales.......Purchase
------x----x----x
01/01/07 ........ 50 ........ 100
01/03/07 ........ 24 ........ 0
01/04/07 ........ 10 ........ 0
01/06/07 ........ 0 ........ 100
--------------
I tried inner and outer joins to links these tables, but all in vein( data is getting repeated then), tried with groups also..no use
Pleeeaaase... help me to do this...
This may be a simple issue for most of you...
But i am a beginner.. i need your valuable help..
Plzzzzz...Just to make sure, but there are no PKeys in either one of your tables?|||You say you need to report by item, so surely there must be some sort of item code in both tables otherwise how do you know what item you're buying / selling?|||Ofcourse item code is there... For sake of simplicity i dint mention that.
Actually both the purchase and sales table has the fileds- Date, Itemcode, Quantity
Sales Table
Date...... ItemCode........Qnty
------------
01/01/07 ..A001............50
01/03/07...A001............24
01/04/07...A001............10
Purchase Table
Date...... ItemCode........Qnty
------------
01/01/07...A001............100
01/06/07...A001............100
and i need a report (like the one mentioned above)based on the movement of Item -A001 ..
Please...........|||First:
You wrote:
There is no link between these 2 tables (except a similarity that both have got a date field)
This is the reason for the questions now I assume itemcode is your link.
Next you will group by date and itemcode if you want, now for grouping by date go to options and choose section to be printed by day.
Then you will need to create formulas that will check to see the quantity of sales and purchases.
Something like:
If {Sales.quantity} > 0
Then {Sales.quantity}
Else 0
Hope that helps,
GJ
Monday, March 19, 2012
How to improve speed of query MSDE 2000
Hi All
I am having trouble with query timeouts in a VB6 program using MSDE 2000 (on
local PC)
It only happens when querying between certain dates ( surprisingly it occurs
when the dates are closer together and hence less records exists)
e.g if date range is 1/8/05 to 1/9/05 query doesn't timeout
if date range 25/8/05 to 1/9/05 it does?
code.....
sql = "select [prod_code], sum(qty) as amount, sum(qty * price) as myprice
from [idetail] where [inv_num] in (Select inv_num from Invoice where
inv_date between '" & Format(DT1.Value, "YYYY-MM-DD") & "' and '" &
Format(DT2.Value, "YYYY-MM-DD") & "') group by prod_code order by prod_code"
rs.Open sql, cn, adOpenKeyset, adLockReadOnly
I have no primary keys or indexes on the idetail table
Any ideas
Regards
Steve
hi Steve,
steve wrote:
> Hi All
> I am having trouble with query timeouts in a VB6 program using MSDE
> 2000 (on local PC)
> It only happens when querying between certain dates ( surprisingly it
> occurs when the dates are closer together and hence less records
> exists)
> e.g if date range is 1/8/05 to 1/9/05 query doesn't timeout
> if date range 25/8/05 to 1/9/05 it does?
> code.....
> sql = "select [prod_code], sum(qty) as amount, sum(qty * price) as
> myprice from [idetail] where [inv_num] in (Select inv_num from
> Invoice where inv_date between '" & Format(DT1.Value, "YYYY-MM-DD") &
> "' and '" & Format(DT2.Value, "YYYY-MM-DD") & "') group by prod_code
> order by prod_code"
> rs.Open sql, cn, adOpenKeyset, adLockReadOnly
> I have no primary keys or indexes on the idetail table
>
a proper indexing schema (as long as a proper primary key, which is always
usefull :D) should always help... but this should not be a related
problem... your actual plan should always be a table scan, followed by a
sort operation, but again, should not be related...
do you have actual lock pending on the table during the failing projections?
try executing
EXEC sp_lock
http://msdn.microsoft.com/library/de...la-lz_6cdn.asp
and
EXEC sp_who
http://msdn.microsoft.com/library/de...wa-wz_3v8v.asp
to determin eventual lock conditions..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
I am having trouble with query timeouts in a VB6 program using MSDE 2000 (on
local PC)
It only happens when querying between certain dates ( surprisingly it occurs
when the dates are closer together and hence less records exists)
e.g if date range is 1/8/05 to 1/9/05 query doesn't timeout
if date range 25/8/05 to 1/9/05 it does?
code.....
sql = "select [prod_code], sum(qty) as amount, sum(qty * price) as myprice
from [idetail] where [inv_num] in (Select inv_num from Invoice where
inv_date between '" & Format(DT1.Value, "YYYY-MM-DD") & "' and '" &
Format(DT2.Value, "YYYY-MM-DD") & "') group by prod_code order by prod_code"
rs.Open sql, cn, adOpenKeyset, adLockReadOnly
I have no primary keys or indexes on the idetail table
Any ideas
Regards
Steve
hi Steve,
steve wrote:
> Hi All
> I am having trouble with query timeouts in a VB6 program using MSDE
> 2000 (on local PC)
> It only happens when querying between certain dates ( surprisingly it
> occurs when the dates are closer together and hence less records
> exists)
> e.g if date range is 1/8/05 to 1/9/05 query doesn't timeout
> if date range 25/8/05 to 1/9/05 it does?
> code.....
> sql = "select [prod_code], sum(qty) as amount, sum(qty * price) as
> myprice from [idetail] where [inv_num] in (Select inv_num from
> Invoice where inv_date between '" & Format(DT1.Value, "YYYY-MM-DD") &
> "' and '" & Format(DT2.Value, "YYYY-MM-DD") & "') group by prod_code
> order by prod_code"
> rs.Open sql, cn, adOpenKeyset, adLockReadOnly
> I have no primary keys or indexes on the idetail table
>
a proper indexing schema (as long as a proper primary key, which is always
usefull :D) should always help... but this should not be a related
problem... your actual plan should always be a table scan, followed by a
sort operation, but again, should not be related...
do you have actual lock pending on the table during the failing projections?
try executing
EXEC sp_lock
http://msdn.microsoft.com/library/de...la-lz_6cdn.asp
and
EXEC sp_who
http://msdn.microsoft.com/library/de...wa-wz_3v8v.asp
to determin eventual lock conditions..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Subscribe to:
Posts (Atom)