RE: Stored Procedure Expects Parameter error
- From: wread@xxxxxxxxxxxxxxxxxxxx (Warren Read)
- Date: Mon, 31 Oct 2005 23:30:47 GMT
You should probably post this to the 'microsoft.. dotnet' alias. I believe
you'll find a better audience for this question there.
Good luck!
--------------------
| Thread-Topic: Stored Procedure Expects Parameter error
| thread-index: AcXUKSWvLRMZAjmNRSSZFJtWNRbkrQ==
| X-WBNR-Posting-Host: 131.107.0.106
| From: =?Utf-8?B?SWxsdXN0cmlz?= <Illustris@xxxxxxxxxxxxxxxxxxxxxxxxx>
| Subject: Stored Procedure Expects Parameter error
| Date: Tue, 18 Oct 2005 14:16:04 -0700
| Lines: 38
| Message-ID: <0AB50312-F78C-4802-A881-2CD783BFE743@xxxxxxxxxxxxx>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.data.odbc
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.data.odbc:2634
| X-Tomcat-NG: microsoft.public.data.odbc
|
| Hello,
|
| I'm sure this is quite simple but nobody I know seems to know the answer
to
| this problem. My app returns the error:
|
| System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server
| Driver][SQL Server]Procedure 'StoredProcedure1' expects parameter
| '@thisDate', which was not supplied.
|
| My Sproc:
|
| CREATE PROCEDURE dbo.StoredProcedure1
| /* Input Parameter named @thisDate */
| (
| @thisDate datetime
| )
|
| AS
| INSERT INTO
| [Feedback] ([FeedDate]) VALUES (@thisDate)
|
| GO
|
| My C#:
|
| string TestMeConnectionString = "myConnString";
| OdbcConnection connTestMe = new OdbcConnection(TestMeConnectionString);
| OdbcCommand cmTestMe = new OdbcCommand("StoredProcedure1", connTestMe);
| cmTestMe.CommandType = CommandType.StoredProcedure;
| OdbcParameter pm = new OdbcParameter("@thisDate",OdbcType.DateTime);
| cmTestMe.Parameters.Add(pm);
| cmTestMe.Parameters["@thisDate"].Value = DateTime.Now;
| connTestMe.Open();
| cmTestMe.ExecuteNonQuery();
| connTestMe.Close();
|
| What am I doing wrong??
|
|
.
- Prev by Date: RE: SQL query within a dsn file ?
- Next by Date: RE: Locale sensitive DS Connection Dialog
- Previous by thread: RE: SQL query within a dsn file ?
- Next by thread: RE: Locale sensitive DS Connection Dialog
- Index(es):
Relevant Pages
|
|