Welcome to dbFreaks.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Close Connection

 
   Database Help (Home) -> Visual Basic RSS
Next:  Date comparison  
Author Message
TIML

External


Since: May 27, 2004
Posts: 3



(Msg. 1) Posted: Thu Jun 10, 2004 6:11 pm
Post subject: Close Connection
Archived from groups: microsoft>public>vb>database (more info?)

I have tried several ways with no success to close the connection to my
datasource. The following code is used to open the datasource and populate
an MS Datagrid.

frmA.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\PlantMonitor1\Data\encoreiq.mdb;" & _
"Persist Security Info=False;Jet OLEDB:Database"
frmA.Adodc1.CommandType = adCmdText

frmA.Adodc1.RecordSource = "select LotJob as Lot, warehouse as [W/h], Bin,
creationdate as [Date Rec], " & _
"qtyonhand as [On Hand], [qtyonhand] - [qtytoship] as [Qty Free],
lotholdflag as [On Hold], Note, QtytoShip as [Ship Qty], " & _
"iif(isnull([ExpiryDate]),'',[ExpiryDate]) as [Expiry Date], lasttrndate as
[Last Transaction] from dbo_lotDetail where " & _
"stockcode = '" & Usc & "' and qtyonhand <> 0"

Set frmA.DataGrid1.DataSource = frmA.Adodc1
frmA.DataGrid1.Refresh

Tim

 >> Stay informed about: Close Connection 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]