Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2006, 05:47 AM
Authorized User
 
Join Date: Mar 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default run time error 13

hi;
i try to a program.this program only makes query on network.(the database's into other host on network) codes:
Dim db1 As Database
Dim rs1 As Recordset
Set db1 = OpenDatabase("\\kiosk\kart\personel.mdb")
Set rs1 = db1.OpenRecordset("select * from kayit where tarih='" & Label4.Caption & "'")
While Not rs1.EOF
Text2.Text = rs1("tarih")
Text3.Text = rs1("adisoyadi")
Text4.Text = rs1("bolumu")
Text7.Text = rs1("unvani")
Text5.Text = rs1("girissaati")
Text6.Text = rs1("cikissaati")
rs1.MoveNext
Wend
......
...
...
End Sub
But gives me error (run time error 13) at Set rs1 = db1.OpenRecordset("select * from kayit where tarih='" & Label4.Caption & "'")
Please help me.What i can do

 
Old March 7th, 2006, 08:08 AM
Authorized User
 
Join Date: Feb 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to amarjits Send a message via MSN to amarjits Send a message via Yahoo to amarjits
Default

Hello dear....this error is basically bcoz of a Type Mismatch...
most probably your field "tarih" is a numeric type...

so make this change:
Set rs1 = db1.OpenRecordset("select * from kayit where tarih=" & Label4.Caption)



VB Databases: runtime error 13 type mismatch






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
run time error 13 selamiduvar VB Databases Basics 1 May 1st, 2006 04:54 PM
run-time error 13: type mismatch bryan.lugo Excel VBA 2 April 19th, 2006 04:39 AM
run time error 13 selamiduvar Access VBA 3 March 7th, 2006 07:46 PM
OpenRecordset And Run-Time Error 13 Type Mismatch Pavesa Access VBA 5 March 22nd, 2005 05:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.