473,626 Members | 3,276 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.openrecor dset("strsql",d bopensnapshot)
if rs.bof and rs.eof then exit sub
text2.text=rs.f ields(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 1042
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.openrecor dset("strsql",d bopensnapshot)
if rs.bof and rs.eof then exit sub
text2.text=rs.f ields(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
4336
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 don't like the brackets.
4
6339
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 found that it was shifted three Bytes to the left, i.e. 4 becomes hex 4000000 which is 67108864 in decimal base. This means that the value written and the value read sometimes do not match, which is of course inacceptable for all real world...
3
4608
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 Access 97 (I know it's old. But, it's the tool they give me to work with) My working knowledge of SQL is on the low side. My working knowledge of VBA is beginner.
1
2692
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 application while running it on my local window machine (IBM WSAD) but still connecting to the AS400. For the local debugging I use "com.ibm.as400.access.AS400JDBCDriver"
3
2192
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 17:49:21.84 spid4 Wait-for graph 2006-06-01 17:49:21.84 spid4 2006-06-01 17:49:21.84 spid4 ... 2006-06-01 17:49:26.92 spid4 ResType:LockOwner Stype:'OR' Mode: S
2
4966
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 still not working correctly. Here is my code: create trigger emp_update_id BEFORE update on emp_update REFERENCING NEW AS N for each row SET unique_id = Generate_unique();
8
3933
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 (STARTDATE, ENDDATE DATE) RETURNS INTEGER DETERMINISTIC NO EXTERNAL ACTION BEGIN ATOMIC DECLARE DAYCOUNT INTEGER
22
4313
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 Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DB.mdf....
3
1133
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 view is a calculated field not stored in the database. It needs to be calculated when any of 3 columns in the datagrid are changed. problem 1: What event for the datagrid is triggered when a cell is modified AFTER it has loaded?...
0
1575
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 20080429211406 TO "C:" INTO NSWD WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.