473,499 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with SQL statement

129 New Member
Hai buddies i am razak .

dim strsql as string

strsql="select * from diary where da=#" & dtpicker1.value &"# and code=" & text1.text
set rs=db.openrecordset("strsql",dbopensnapshot)
if rs.bof and rs.eof then exit sub
text2.text=rs.fields(3)
rs.close

it have an error [ jet db strsql is nothing check the spelling etc]

i am already set the db source from form load()

here the "diary" is the table name


plz help me guys !!!

Thanx in advance..
Dec 23 '06 #1
3 1037
willakawill
1,646 Top Contributor
Hai buddies i am razak .

dim strsql as string

strsql="select * from diary where da=#" & dtpicker1.value &"# and code=" & text1.text
set rs=db.openrecordset("strsql",dbopensnapshot)
if rs.bof and rs.eof then exit sub
text2.text=rs.fields(3)
rs.close

it have an error [ jet db strsql is nothing check the spelling etc]

i am already set the db source from form load()

here the "diary" is the table name


plz help me guys !!!

Thanx in advance..
Hi. Happy Holidays :)

change this
Expand|Select|Wrap|Line Numbers
  1. set rs=db.openrecordset("strsql",dbopensnapshot)
to this
Expand|Select|Wrap|Line Numbers
  1. set rs=db.openrecordset(strsql,dbopensnapshot)
Dec 24 '06 #2
dwadish
129 New Member
Hi. Happy Holidays :)

change this
Expand|Select|Wrap|Line Numbers
  1. set rs=db.openrecordset("strsql",dbopensnapshot)
to this
Expand|Select|Wrap|Line Numbers
  1. set rs=db.openrecordset(strsql,dbopensnapshot)
thanx and it helped me to proceed
Dec 27 '06 #3
willakawill
1,646 Top Contributor
thanx and it helped me to proceed
You are very welcome
Dec 27 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

68
4286
by: Marco Bubke | last post by:
Hi I have read some mail on the dev mailing list about PEP 318 and find the new Syntax really ugly. def foo(x, y): pass I call this foo(1, 2), this isn't really intuitive to me! Also I...
4
6319
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
3
4600
by: Andy_Khosravi | last post by:
I have been trying to build a user friendly search engine for a small database I have created. I'm having some particular problems with one of my date fields. Here's the setup: I'm using...
1
2680
by: tom.eeraerts | last post by:
Hello, I have a problem migrating an application from v5r2 to v5r3. The problem is with the prepared statements. To see what the problem is, i extracted a small piece of code and debugged the...
3
2188
by: shark | last post by:
Hi all. i am facing a deadlock problem .i have included the -t1204 and -T3605 trace flags and have got the following o/p pu tin sqls server logs. 2006-06-01 17:49:21.84 spid4 2006-06-01...
2
4954
by: mob1012 via DBMonster.com | last post by:
Hi All, I wrote last week about a trigger problem I was having. I want a trigger to produce a unique id to be used as a primary key for my table. I used the advice I received, but the trigger is...
8
3916
by: Ian Mackenzie | last post by:
Hi Guys I am VERY new to DB2 and have created a workingdays function to return the working days between 2 dates, but I get some compiler errors when running it: CREATE FUNCTION WORKINGDAYS...
22
4289
by: b_r | last post by:
Hi, I'm trying to make a simple operation (insert into DB) in VB 2005 and SQL Server. The code is as follows: Dim sConnectionString As String = _ "Data...
3
1119
by: Tony K | last post by:
I'm note sure how to state this but, I have a Windows form that contains 2 tables. Details View on top and Datagrid on the bottom. The two tables are related. One of the fields in the details...
0
1559
by: aashiss03 | last post by:
hi everyone I m restorimg a database , during which i m facing the peoblem Here is the details description the problem. RESTORE DATABASE NSWD FROM "C:\db2_backups" TAKEN AT...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5479
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4920
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.