Check database table for pre-existing record

  • Thread starter Islay Rodriguez Jr.
  • Start date
I

Islay Rodriguez Jr.

I'm trying to check if a "CompanyProductNumber" already exists in a database
table
from within the "CompanyPruductNumber_TextChanged" event handler.

I have configured an SQLDataSource from the tool box called
"CheckRawMaterial"
with an sql select statement:

SELECT RawMaterialName FROM RawMaterial WHERE (CompanyProductNumber =
@CompanyProdNum) AND (CompanyID = @CompID)

with parameters @CompanyProdNum and @CompID which are bound to a
textbox.text control and a session field value. I have tested the SQL
statement in the configuration wizard and it works.

My problem is that I can't figure out how to execute the Select staement
from within the "CompanyPruductNumber_TextChanged" event handler. The
"CheckRawMaterial" object has no execute method.

I would appreciate any help.

Thanks,
 
I

Islay Rodriguez Jr.

Thanks for your quick response, Can you direct me to some good examples?

Islay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top