473,387 Members | 1,834 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,387 software developers and data experts.

How to get records in two table with one same datafield: v.b 6.0

Dear all,

I,m doing a application in v.b 6.0 and can anyone solve my issue plz tell me how to retrive the two tables in a same time with one commonfield

Pinvoice1(Table1) Pinvoice2(Table2)
............... .................
InvNo Primary key InvNo foreign key refrence Pinvoice(InvNo)
SupId int ItemNo int
Supname varchar(20) Descrp varchar(20)
Pdate datetime Price float
Qty int
Gross
(i made it to avoid the repeated value of SupId,Supname,Pdate)

i need the out put when i type the invoice number in a textbox the first table datas in textboxes and the second table datas in a datagrid

so i used 2 Adodc control and in one control i specify the table name

in 1st adodc control Recordsource adcmdText i used this query
select ItemNo,Descrp,Rate,Qty,Gross from Pinvoice where
InvNo=& and drag a datagrid and given the datasource as adodc1
but when i tried to run my form it showed me error msg
"Incorrect syntex near&" as well page loading & close


Then i draged a button and textbox in the button click event i used this query
Dim sqlstring
sqlstring = "select ItemNo,Descrp,Rate,Qty,Gross from Pinvoice where InvNo=& txtTest.Text"
Adodc2.RecordSource = sqlstring
Adodc2.Refresh

it also showed me the error msges like
1. "Microsoft[ODBC Driver manager]datasource name not found" so i droped it.
2."Incorrect syntex near&"
3.Method 'Refresh' of object 1Adodc failed"

so what is the mistake in my coding and how to specify for parricular record
Apr 16 '08 #1
1 1202
debasisdas
8,127 Expert 4TB
try to do that using SQl statement.

Better to use ADODB instead of ADODC.
Apr 16 '08 #2

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

Similar topics

0
by: .Net Sports | last post by:
I'm able to display the lname and fname variables in my datagrid , using the below sql string strSQLQuery = "SELECT fname + ' ' + lname AS Name, cust_id " _ & "FROM tblcusttag " _ & "WHERE...
4
by: Tom Keane | last post by:
Okay, woo, yet another issue I have. I remember writing about this issue AGES ago, but I don't think it worked, or I just left it for too long. I have a query that searches for specific records...
2
by: Troy | last post by:
I have been trying for 2 weeks to figure out how to implement a table as a member variable that the user can setup with the property designer with no luck. The code below adds the table to the...
2
by: J Sahoo | last post by:
Hi, I have a browse page where I am showing few fields from my SQL Server table. One of the field is Image type, all the fields are bound to a single table. I want to show the image from the...
1
by: mursyidatun ismail | last post by:
Dear all, database use: Ms Access. platform: .Net i'm trying to update a record/records in a table called t_doctors by clicking da edit link provided in the database. when i ran through da...
0
by: JLuv | last post by:
What i want to do is take the checked data from a datagrid, send it to a table, then show that table on an Excel Spreadsheet. Here is a little bit of my code... //adminProgress.aspx...
0
by: inf42 | last post by:
The issue is this. Have one table with two others related to it. Now I use the others to display the proper names in the field, which there indexes are stored in the table I want to update the data...
1
by: Marc | last post by:
Hi, I made a detailsview for inserting records. I also made a gridview for editing and deleting the same records. The keyfield is an autonumbering field in Access (pcnr). My problem is: I can...
3
by: bobdurie | last post by:
Hi, We have a Java application that runs against a variety of backends including Oracle and MSSql 2000 and 2005. Our application has a handful of active tables that are constantly being...
2
by: xMetalDetectorx | last post by:
Hi Everyone, I have a very simple web app that uses .Net 2.0 login control to authenticate users and allow access to an "admin" folder. Inside that admin folder I have one page that has a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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...

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.