LeahLady79
Programmer
Hello all...
Here is my problem. I am trying to gather specific information from fields in my Paradox tables. When I execute the SQL statements in Access, they work beautifully... but when I copy them over to VB 6 I am getting:
"too few parameters" error when I try to put it as the RecordSource for the adodc
"expected SELECT, INSERT, DELETE.." when I try to put it in the actual code as an SQL string.
Here is the SQL statement I am running:
SELECT UserInfo.Rep_Name, ADCAL.ADVERTIZER, ADCAL.DESC
FROM ADCAL, UserInfo
WHERE ((([ADCAL]![NAME]) Like [UserInfo]![User_name] & "*");
ALSO, I need to run an insert/delete to populate a table each time the program runs. I am getting an "expected more parameters" error for this statement as well:
INSERT INTO Holding ( [Key], Name )
SELECT [ADCAL].[Name], [Rep_Name]
FROM ADCAL, UserInfo
WHERE (([ADCAL]![NAME] Like [UserInfo]![User_name] & "*");
Any ideas where I'm going wrong? Why would these statements work in Access but not in VB??
Thank you!!
Here is my problem. I am trying to gather specific information from fields in my Paradox tables. When I execute the SQL statements in Access, they work beautifully... but when I copy them over to VB 6 I am getting:
"too few parameters" error when I try to put it as the RecordSource for the adodc
"expected SELECT, INSERT, DELETE.." when I try to put it in the actual code as an SQL string.
Here is the SQL statement I am running:
SELECT UserInfo.Rep_Name, ADCAL.ADVERTIZER, ADCAL.DESC
FROM ADCAL, UserInfo
WHERE ((([ADCAL]![NAME]) Like [UserInfo]![User_name] & "*");
ALSO, I need to run an insert/delete to populate a table each time the program runs. I am getting an "expected more parameters" error for this statement as well:
INSERT INTO Holding ( [Key], Name )
SELECT [ADCAL].[Name], [Rep_Name]
FROM ADCAL, UserInfo
WHERE (([ADCAL]![NAME] Like [UserInfo]![User_name] & "*");
Any ideas where I'm going wrong? Why would these statements work in Access but not in VB??
Thank you!!