6 Replies - 11481 Views - Last Post: 16 July 2009 - 08:48 PM Rate Topic: -----

#1 srbatcha1  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 14
  • Joined: 16-July 09

multi user environment code for vb6.0 with ms-access database project

Post icon  Posted 16 July 2009 - 03:01 AM

i am doing one project in vb6.0 with ms-access 2003 environment
i'm using single user code only
i want code for multi user access code using these platform

and another questions is
how to print the image file using vb6.0 coding.

please help me its very urgent

Advanced Thanks for your reply.
Is This A Good Question/Topic? 0
  • +

Replies To: multi user environment code for vb6.0 with ms-access database project

#2 srbatcha1  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 14
  • Joined: 16-July 09

Re: multi user environment code for vb6.0 with ms-access database project

Post icon  Posted 16 July 2009 - 04:06 AM

i have one problem using in my vb6.0 with ms-access2003 project

i have two tables in ms-access one is project_table another one is sales_order table

project_table contain following datas...
project_table: project_id is (primary key ),sono,etc...

sales_order_table contains following datas...
sales_order_table: project_id(foreign key),sono.

first user willi add all the data in project_table except sono. because sono data will get latter.

so this sono will add after that one week with bulk sono list is insert (using update query) in project table using upload method.

please give me a right solutions as soon as possible because its very urgent for me.

Advanced Thanks for you reply
Was This Post Helpful? 0
  • +
  • -

#3 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: multi user environment code for vb6.0 with ms-access database project

Posted 16 July 2009 - 05:13 AM

Can we see the code that you are working on :)
Was This Post Helpful? 0
  • +
  • -

#4 srbatcha1  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 14
  • Joined: 16-July 09

Re: multi user environment code for vb6.0 with ms-access database project

Post icon  Posted 16 July 2009 - 01:18 PM

i am doing one project using vb6.0 with ms-access2003. i want multiuser
environment coding , i have already used following code its correct or not?
and if any other steps missing or not?
cursor type and lock type is correct or not?
what i do ? what i don't?
please send me kindly reply its very urgent
Advance Thanks for your reply.

my coding:

Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset

Private Sub Form_Load()
Dim d As String
d = "dsn=bala"
con.ConnectionString = d
con.Open
con.Close
End Sub

Private Sub Command1_Click()
If con.state=1 then
Con.close
End if

con.Open
rec.Open "select * from customer", con, adOpenKeyset, dLockOptimisticcon.BeginTrans
con.Execute " insert into test4 values(" & Val(Text1.Text) & ",'" & trim(Option1(j).Caption) & "','" & Trim(Text2.Text) & "')"
con.CommitTrans
con.Close
MsgBox "Record saved"
End Sub
Was This Post Helpful? 0
  • +
  • -

#5 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: multi user environment code for vb6.0 with ms-access database project

Posted 16 July 2009 - 08:33 PM

A couple of in which to print an image.

You could use the shellexecute API with the "print" keyword.
You could load the picture and use the printer.paintpicture method

As for multi user VB6 to access database, you may or may not have to change your existing code. It all depends upon how you do your edits and additions. It is best to use SQL statements to do these operations versus .edit/.addnew/.update/.refresh methods even though you will still have to use the .refresh method once you execute the UPDATE/INSERT SQL statements to see the revised/added data.


Good Luck
Was This Post Helpful? 0
  • +
  • -

#6 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: multi user environment code for vb6.0 with ms-access database project

Posted 16 July 2009 - 08:37 PM

To insert a new record...

strSQL = "INSERT INTO TableName (FieldName1, FieldName2,...) VALUES (Value1, Value2, ...)

To edit data

UPDATE TableName SET FieldName1 = Value1, FieldName2 = Value2, ... WHERE UniqueFieldCriteria = UniqueValue



Good Luck
Was This Post Helpful? 0
  • +
  • -

#7 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: multi user environment code for vb6.0 with ms-access database project

Posted 16 July 2009 - 08:48 PM

You do not need to open a recordset to execute your insert statement, however, if you want to see the freshly added data, then you could execute your query after the insert.


Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1