Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
polecat799
Starting Member
2 Posts |
Posted - 2006-05-08 : 19:05:04
|
| I was wondering if its possible to send a block of SQL code to an access database using VB.net I would like to send an IF block to check a query then insert the data only if the IF is true. |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-08 : 20:52:42
|
post this at the ms access forum...but to get you going, you can issue the if in your vb like..if statement is true then run your code hereendifi think i'm oversimplifying again, better provide more information --------------------keeping it simple... |
 |
|
|
polecat799
Starting Member
2 Posts |
Posted - 2006-05-09 : 08:37:04
|
| thanks, but i guess I wasnt very clear,basicly im trying to write a statement that will check to see if something exists in the db first then if it does n't insert that data. so the block i want to send to the db isIF NOT EXIST(SELECT * FROM...)BEGININSERT ...ENDif there is a better way to check for existance and insert in one call to the db I would love to learn what it is!! |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-09 : 08:43:55
|
in mssql, you would create an sproc for that with parameters of what you need to insert plus the checking, in ms access, i guess you can create a query object --------------------keeping it simple... |
 |
|
|
|
|
|