Click here to Skip to main content
15,881,803 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to make select query to access view in other server Pin
Hesham Amin6-Mar-07 23:57
Hesham Amin6-Mar-07 23:57 
QuestionNumeric Issue Pin
Darkness846-Mar-07 19:13
Darkness846-Mar-07 19:13 
AnswerRe: Numeric Issue Pin
Colin Angus Mackay6-Mar-07 21:34
Colin Angus Mackay6-Mar-07 21:34 
GeneralRe: Numeric Issue Pin
Darkness847-Mar-07 1:58
Darkness847-Mar-07 1:58 
GeneralRe: Numeric Issue Pin
Dave Kreskowiak7-Mar-07 8:12
mveDave Kreskowiak7-Mar-07 8:12 
QuestionEmail subscription permission denied on SSRS 2000 Pin
bubberz6-Mar-07 11:10
bubberz6-Mar-07 11:10 
Questionprepared statment Pin
jds12076-Mar-07 10:17
jds12076-Mar-07 10:17 
AnswerRe: prepared statment Pin
Mark J. Miller7-Mar-07 6:13
Mark J. Miller7-Mar-07 6:13 
If you want to parameterize the query, use the following syntax instead of concatenating strings:

Dim MyCommand As New MySqlCommand("INSERT INTO ls_partsprice (PartNum, PartRetailPrice, PartSalePrice) Values(@PartNum,@PartRetailPrice,@PartSalePrice)")

Then use MyCommand.Parameters.Add() method to create parameters which match the ones in the SQL string (@PartNum, @PartRetailPrice,@PartSalePrice). Make sure after you create the parameters to set the precision and scale for the 'Price' parameters otherwise the values will vary based on the value you pass. Which means that SQL server will reparse the query.

MyCommand.Parameters("@PartRetailPrice").Precision = 5
MyCommand.Parameters("@PartRetailPrice").Scale = 2

DISCLAIMER: I'm not a VB.Net programmer, so the actual syntax may be different than what I've put here, but you should get the idea.

Also, check out my article on parameterizing SQL queries: http://www.codeproject.com/cs/database/ParameterizingAdHocSQL.asp[^]
QuestionSQL For XML Query [modified] Pin
GaryWoodfine 6-Mar-07 5:53
professionalGaryWoodfine 6-Mar-07 5:53 
AnswerRe: SQL For XML Query Pin
Colin Angus Mackay6-Mar-07 21:30
Colin Angus Mackay6-Mar-07 21:30 
GeneralRe: SQL For XML Query Pin
GaryWoodfine 6-Mar-07 22:36
professionalGaryWoodfine 6-Mar-07 22:36 
GeneralRe: SQL For XML Query Pin
Colin Angus Mackay7-Mar-07 10:00
Colin Angus Mackay7-Mar-07 10:00 
GeneralRe: SQL For XML Query Pin
GaryWoodfine 6-Mar-07 23:20
professionalGaryWoodfine 6-Mar-07 23:20 
GeneralRe: SQL For XML Query Pin
Colin Angus Mackay7-Mar-07 10:01
Colin Angus Mackay7-Mar-07 10:01 
Questionopening ado recordset for update is very very slow Pin
gritter6-Mar-07 5:16
gritter6-Mar-07 5:16 
AnswerRe: opening ado recordset for update is very very slow Pin
andyharman6-Mar-07 6:52
professionalandyharman6-Mar-07 6:52 
GeneralRe: opening ado recordset for update is very very slow Pin
gritter6-Mar-07 7:31
gritter6-Mar-07 7:31 
QuestionDataBase BackUp And Restore Remote Server Pin
Gali yugan6-Mar-07 3:11
Gali yugan6-Mar-07 3:11 
AnswerRe: DataBase BackUp And Restore Remote Server Pin
Mark J. Miller7-Mar-07 6:23
Mark J. Miller7-Mar-07 6:23 
QuestionHow to find foreign key for a given table in sql server 2005 Pin
NK76-Mar-07 1:11
NK76-Mar-07 1:11 
AnswerRe: How to find foreign key for a given table in sql server 2005 Pin
Pete O'Hanlon6-Mar-07 1:24
mvePete O'Hanlon6-Mar-07 1:24 
GeneralRe: How to find foreign key for a given table in sql server 2005 Pin
NK76-Mar-07 1:39
NK76-Mar-07 1:39 
QuestionRAISERROR Pin
topcatalpha6-Mar-07 0:12
topcatalpha6-Mar-07 0:12 
AnswerRe: RAISERROR Pin
Pete O'Hanlon6-Mar-07 1:20
mvePete O'Hanlon6-Mar-07 1:20 
GeneralRe: RAISERROR Pin
topcatalpha6-Mar-07 5:19
topcatalpha6-Mar-07 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.