| Author |
Topic |
|
golan
Starting Member
6 Posts |
Posted - 2006-04-14 : 18:15:40
|
| I have a MS SQL server DB which stores tables and queries and a MS Access DB which acts as an interface and stores Forms.I am a MS Access Developre and this is my first MS Sql Server DB. I would like to know how can i pass a variable which is an object in a Form (In MS Access DB) to a query in MS SQL?In MS Access( i mean mdb file which all tables, queries and forms are in one mdb file)it is very easy, for example if you would like to pass idfld from Form of frminfo to a query you can say: Where idname like " & Forms!frminfo!idfld , but it does not work on MS SQL. Would you please tell me how can i use a variable in MS SQL query?ThankEbi |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-04-14 : 18:27:47
|
| Usually you interact with sql server via stored procedures and pass them parameters.If you want to access the structure directly then you have to build the where clause into the query.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
golan
Starting Member
6 Posts |
Posted - 2006-04-14 : 18:41:20
|
| Hi nr,what is the code in MS SQL?In MS Access as i told to get a variable from a Form is:Select * From frminfoWhere idname like Forms!frminfo!idfldwhich "Forms!frminfo!idfld" is our variable and come from frminfo Form. well my question is what is the syntax in MS SQL?I used same in MS SQL but it asks me "Enter Parameter Value". any help? |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-04-14 : 19:14:19
|
| sql server doesn't know anything about the form. It's a database - access gives you a client interface application as well.It depends on how you are trying to access the database from the cliect as to what your code would look like.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-04-14 : 19:43:08
|
| Golan, U may need to learn about ADO or some such to interact with SQL server.Srinika |
 |
|
|
golan
Starting Member
6 Posts |
Posted - 2006-04-15 : 02:07:25
|
| Hi Srinika,could you please give me more information about the ado? |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-15 : 02:11:46
|
| I guess this will be good peice of information for u http://support.microsoft.com/kb/281998If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
golan
Starting Member
6 Posts |
Posted - 2006-04-15 : 02:40:38
|
| Hi chiragkhabaria,It is really helpfull, I just took a look at it and it seems it is good. |
 |
|
|
golan
Starting Member
6 Posts |
|
|
|