473,412 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

problem in moving the memofield of ms access into vb recordset

hi to all i am using ADODB.Recordset in vb and i have some problem when i tried to move the text in the memofield of ms access database to the recordset.
while running at first it moves to recordset but suddenly it disappears and showing null value in recordset.
Jan 4 '07 #1
3 1112
Killer42
8,435 Expert 8TB
hi to all i am using ADODB.Recordset in vb and i have some problem when i tried to move the text in the memofield of ms access database to the recordset.
while running at first it moves to recordset but suddenly it disappears and showing null value in recordset.
Could you show us the code?
Jan 4 '07 #2
Could you show us the code?
In this code rs2(1) and rs2(3) recordsets shows null values because i am using memo fields for those in ms access database

Private Sub showitemvalues()
Set rs = cn.Execute("select * from template_master where matgroup_id=" & txtnounid & " order by temp_sorted")
Set rs1 = cn.Execute("select count(item_id) from item_master where matgroup_id like '" & txtnounid & "'")
If rs1(0) <> 0 Then
Set rs2 = cn.Execute("select uom_code,addl_data,internal_desc,long_desc,materia l_type,item_id,material_group_id,flag_no from item_master where matgroup_id = " & txtnounid & " and item_id = " & txtitemid)
Set rs3 = cn.Execute("select mat_code from material_group where material_group_id = " & rs2(6))
txtuom.Text = rs2(0)
txtaddl_data.Text = IIf(IsNull(rs2(1)), "", rs2(1))
txtintdesc.Text = IIf(IsNull(rs2(2)), "", rs2(2))
txtlongdesc.Text = IIf(IsNull(rs2(3)), "", rs2(3))
txtmattype.Text = IIf(IsNull(rs2(4)), "", rs2(4))
txtmaterial_group_id = rs2(6)
txtmatgroup.Text = IIf(IsNull(rs3(0)), "", rs3(0))

If rs2(7) = "G" Then
txttype.Text = "Item"
ElseIf rs2(7) = "T" Then
txttype.Text = "Text"
Else
txttype.Text = "Spare"
End If


Else
Exit Sub
End If
End Sub
Jan 5 '07 #3
Killer42
8,435 Expert 8TB
I haven't had time to read the code yet. I'm just going to put it in [c o d e] tags for readability. I might also split some of the longer lines, to get them to fit the window here.
Expand|Select|Wrap|Line Numbers
  1. Private Sub showitemvalues()
  2. Set rs = cn.Execute("select * from template_master" & _
  3.       " where matgroup_id=" & txtnounid & _
  4.       " order by temp_sorted")
  5. Set rs1 = cn.Execute("select count(item_id) from item_master" & _
  6.       " where matgroup_id like '" & txtnounid & "'")
  7. If rs1(0) <> 0 Then
  8.   Set rs2 = cn.Execute("select uom_code,addl_data,internal_desc," & _
  9.         " long_desc, material_type, item_id, material_group_id," & _
  10.         " flag_no from item_master" & _
  11.         " where matgroup_id = " & txtnounid & _
  12.         " and item_id = " & txtitemid)
  13.   Set rs3 = cn.Execute("select mat_code from material_group" & _
  14.         " where material_group_id = " & rs2(6))
  15.   txtuom.Text = rs2(0)
  16.   txtaddl_data.Text = IIf(IsNull(rs2(1)), "", rs2(1))
  17.   txtintdesc.Text = IIf(IsNull(rs2(2)), "", rs2(2))
  18.   txtlongdesc.Text = IIf(IsNull(rs2(3)), "", rs2(3))
  19.   txtmattype.Text = IIf(IsNull(rs2(4)), "", rs2(4))
  20.   txtmaterial_group_id = rs2(6)
  21.   txtmatgroup.Text = IIf(IsNull(rs3(0)), "", rs3(0))
  22.   If rs2(7) = "G" Then
  23.     txttype.Text = "Item"
  24.   ElseIf rs2(7) = "T" Then
  25.     txttype.Text = "Text"
  26.   Else
  27.     txttype.Text = "Spare"
  28.   End If
  29. Else
  30.   Exit Sub
  31. End If
  32. End Sub
Jan 5 '07 #4

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

Similar topics

8
by: Dave | last post by:
Hi all, I've been trying to figure this out for the last day and a half and it has me stumped. I've got a web application that I wrote that keeps track of trading cards I own, and I'm moving it...
4
by: Eric E | last post by:
Hi all, I have a fairly complex form in Access 2000. In particular, it has two subforms on separate tabs of a tab control. For the last two weeks, I've encountered the dreaded : "You can't...
3
by: John | last post by:
I have a field, data type Memo, in a job details table. I have a text box on a report which I need to print the contents of this field. My problem is that the text box will only display 255...
2
by: corepaul | last post by:
I am fairly new to Access and I have a problem trying to use bookmarks with a recordset. I have a recordset dimensioned as, Dim rstFoodDesc As ADODB.Recordset ' recordset Dim bMark As...
15
by: Deano | last post by:
I've posted about this subject before but haven't really got anywhere yet. I have now come up with a plan of action that takes into account my strong desire to implement save/discard functionality...
0
by: jayohare | last post by:
Hello, I have code within my DB application to process credit cards through authorize.net. Ive been using the same code for several years without a problem. I have an order entry computer and...
22
by: MP | last post by:
vb6,ado,mdb,win2k i pass the sql string to the .Execute method on the open connection to Table_Name(const) db table fwiw (the connection opened via class wrapper:) msConnString = "Data Source="...
15
by: sara | last post by:
I have a Memo field in a table to hold notes from a conversation a social worker has had with a client (this is for a non-profit). If the user needs to update the memo field, I need to find the...
0
by: Yarik | last post by:
Hello, Here is a sample (and very simple) code that binds an Access 2003 form to a fabricated ADO recordset: ' Create recordset... Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset '...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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,...
0
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
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...

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.