Showing posts with label enter. Show all posts
Showing posts with label enter. Show all posts

Sunday, March 11, 2012

accept user from user to enter a field value for a sql

Hi-

I am trying to achieve a similar query in ORACLE but donno how to do it in Ms SQL Server and MS Access (I have to do it for both these databases)

SELECT * FROM someTable
WHERE someField = &EnterValue

When this query is executed in ORACLE, it will ask user to enter value for &EnterValue and then execute the query using the user entered value.

Can this be done in MS SQL Server and MS ACCESS?

Please help...

ThanksHi-

Found the answer for MsAccess, I need to enter =[EnterValue] in Criteria for a given column.

Still looking for answer for MS SQL Server. Is Stored Proc the only answer?

Please help...

Best Wishes,|||SQL Server will not prompt the user for a parameter value. It needs to be supplied.

It is normally done like this:


SELECT * FROM someTable
WHERE someField = @.someValue

and Parameters are used to provide the query with the parameter value that the user has input from a data entry screen. You do not necessarily need a stored procedure to accomplish this (although I believe that is the best way).

Check out the ASP.NET tutorialServer-Side Data Access, especially the "Performing a Parameterized Select" section, to see how to use Parameters with ADO.NET.

Terri

acc97 switchboard error. 3146 Can someone look and tell a rookie what is wrong?

Onl;y one user has the problem.
I have given them a new copy of the switchboard but same startup error.
IOSDSQL 664-964 ENTER SQLSetStmtOption
HSTMT 0A0B1EC8
UWORD 0 <SQL_QUERY_TIMEOUT>
SQLPOINTER 0x0000003C
IOSDSQL 664-964 EXIT SQLSetStmtOption with return code 0
(SQL_SUCCESS)
HSTMT 0A0B1EC8
UWORD 0 <SQL_QUERY_TIMEOUT>
SQLPOINTER 0x0000003C (BADMEM)
IOSDSQL 664-964 ENTER SQLExecDirect
HSTMT 0A0B1EC8
UCHAR * 0x09FB18C0 [ -3] "SELECT
"dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
"dbo"."New_OnCall" ORDER BY "Lang" \ 0"
SDWORD -3
IOSDSQL 664-964 EXIT SQLExecDirect with return code -1 (SQL_ERROR)
HSTMT 0A0B1EC8
UCHAR * 0x09FB18C0 [ -3] "SELECT
"dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
"dbo"."New_OnCall" ORDER BY "Lang" \ 0"
SDWORD -3
DIAG [37000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
Incorrect syntax near '.'. (170)You may have better success posting this in one of the numerous
microsoft.public.access newsgroups.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"BrianMultilLanguage" <brian@.clilang.com> wrote in message
news:12k1s5d2cdmo10@.corp.supernews.com...
> Onl;y one user has the problem.
> I have given them a new copy of the switchboard but same startup error.
> IOSDSQL 664-964 ENTER SQLSetStmtOption
> HSTMT 0A0B1EC8
> UWORD 0 <SQL_QUERY_TIMEOUT>
> SQLPOINTER 0x0000003C
> IOSDSQL 664-964 EXIT SQLSetStmtOption with return code 0
> (SQL_SUCCESS)
> HSTMT 0A0B1EC8
> UWORD 0 <SQL_QUERY_TIMEOUT>
> SQLPOINTER 0x0000003C (BADMEM)
> IOSDSQL 664-964 ENTER SQLExecDirect
> HSTMT 0A0B1EC8
> UCHAR * 0x09FB18C0 [ -3] "SELECT
> "dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
> "dbo"."New_OnCall" ORDER BY "Lang" \ 0"
> SDWORD -3
> IOSDSQL 664-964 EXIT SQLExecDirect with return code -1
> (SQL_ERROR)
> HSTMT 0A0B1EC8
> UCHAR * 0x09FB18C0 [ -3] "SELECT
> "dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
> "dbo"."New_OnCall" ORDER BY "Lang" \ 0"
> SDWORD -3
> DIAG [37000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
> Incorrect syntax near '.'. (170)
>

acc97 switchboard error. 3146 Can someone look and tell a rookie what is wrong?

Onl;y one user has the problem.
I have given them a new copy of the switchboard but same startup error.
IOSDSQL 664-964 ENTER SQLSetStmtOption
HSTMT 0A0B1EC8
UWORD 0 <SQL_QUERY_TIMEOUT>
SQLPOINTER 0x0000003C
IOSDSQL 664-964 EXIT SQLSetStmtOption with return code 0
(SQL_SUCCESS)
HSTMT 0A0B1EC8
UWORD 0 <SQL_QUERY_TIMEOUT>
SQLPOINTER 0x0000003C (BADMEM)
IOSDSQL 664-964 ENTER SQLExecDirect
HSTMT 0A0B1EC8
UCHAR * 0x09FB18C0 [ -3] "SELECT
"dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
"dbo"."New_OnCall" ORDER BY "Lang" \ 0"
SDWORD -3
IOSDSQL 664-964 EXIT SQLExecDirect with return code -1 (SQL_ERROR)
HSTMT 0A0B1EC8
UCHAR * 0x09FB18C0 [ -3] "SELECT
"dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
"dbo"."New_OnCall" ORDER BY "Lang" \ 0"
SDWORD -3
DIAG [37000] [Microsoft][ODBC SQL Server Driver][SQL Server]
Line 1:
Incorrect syntax near '.'. (170)You may have better success posting this in one of the numerous
microsoft.public.access newsgroups.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"BrianMultilLanguage" <brian@.clilang.com> wrote in message
news:12k1s5d2cdmo10@.corp.supernews.com...
> Onl;y one user has the problem.
> I have given them a new copy of the switchboard but same startup error.
> IOSDSQL 664-964 ENTER SQLSetStmtOption
> HSTMT 0A0B1EC8
> UWORD 0 <SQL_QUERY_TIMEOUT>
> SQLPOINTER 0x0000003C
> IOSDSQL 664-964 EXIT SQLSetStmtOption with return code 0
> (SQL_SUCCESS)
> HSTMT 0A0B1EC8
> UWORD 0 <SQL_QUERY_TIMEOUT>
> SQLPOINTER 0x0000003C (BADMEM)
> IOSDSQL 664-964 ENTER SQLExecDirect
> HSTMT 0A0B1EC8
> UCHAR * 0x09FB18C0 [ -3] "SELECT
> "dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
> "dbo"."New_OnCall" ORDER BY "Lang" \ 0"
> SDWORD -3
> IOSDSQL 664-964 EXIT SQLExecDirect with return code -1
> (SQL_ERROR)
> HSTMT 0A0B1EC8
> UCHAR * 0x09FB18C0 [ -3] "SELECT
> "dbo"."New_OnCall"."Lang","dbo"."New_OnCall"."Int:No" FROM
> "dbo"."New_OnCall" ORDER BY "Lang" \ 0"
> SDWORD -3
> DIAG [37000] [Microsoft][ODBC SQL Server Driver][SQL Serv
er]Line 1:
> Incorrect syntax near '.'. (170)
>

Saturday, February 11, 2012

about Db table cell setting

How do I enable multiline on data table rows (cells)?

When I press enter the cursor jumps to the next cell and no the next line in the same cell.

Thanks

Hi,

What version of SQL Server are you using, also what application are you using?

Visual Studio, Access, ASP Web App etc...|||

hi,

sql server 2005 express and standard edition.

Thanks