User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,522 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,608 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 555 | Replies: 1 | Solved
Reply
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Parameters in SQL help with ASP.NET

  #1  
Oct 8th, 2007
I am trying to alter some SQL to use parameters. I bypassed this earlier as it was just not working but am now heading back to tidy up. For some reason I cannot get this to work, keep in mind I am using Odbc:
SQLString = "SELECT * FROM Stories WHERE StoryID=?"
  'cmdSelectStory.Parameters.Add( "?StoryID", OdbcType.BigInt )
  'cmdSelectStory.Parameters.Add( "?StoryID" ).Value = strStoryID
Anyway I try, I cannot get the parameters to add to the SQL string. In the Odbc database, this column is BigInt(20). I have just been adding it directly into the SQL string, but am now converting that to parameters but cannot figure how. Any help would be appreciated!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Parameters in SQL help with ASP.NET

  #2  
Oct 8th, 2007
Sorry, after looking at it I realized that I added the parameters before calling it from the command. Therefore, an error arised. fixed.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:45 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC