Click here to Skip to main content
15,897,273 members
Home / Discussions / Database
   

Database

 
GeneralSimple Question on Oracle dbms_utility.get_time Pin
devvvy20-Oct-04 20:34
devvvy20-Oct-04 20:34 
GeneralRe: Simple Question on Oracle dbms_utility.get_time Pin
DiWa20-Oct-04 22:44
DiWa20-Oct-04 22:44 
QuestionDatasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com20-Oct-04 12:03
david@mindplay.com20-Oct-04 12:03 
AnswerRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay20-Oct-04 22:00
Colin Angus Mackay20-Oct-04 22:00 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 8:16
david@mindplay.com21-Oct-04 8:16 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 11:44
Colin Angus Mackay21-Oct-04 11:44 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:11
david@mindplay.com21-Oct-04 12:11 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:23
Colin Angus Mackay21-Oct-04 12:23 
David Bliss wrote:
Also, I wanted to use datasets because, I guess you can store strings in the database and not have to worry about special characters like ' and ;. Is this true? Right now I'm having a hell of a time with storing strings containing special characters.

You should use parameterised queries. The syntax is slightly different depending on the database. SqlServer uses named parameters, while Access uses placeholders and you must supply the parameters in the same order that they appear in the query.

Here is an example using Sql Server
SqlCommand cmd = new SqlCommand("SELECT * FROM TableA WHERE ColumnA = @ParameterA AND ColumnB = @ParameterB");
cmd.Parameters.Add("@ParameterA", "David's Data");
cmd.Parameters.Add("@ParameterB", "String with ; semi-colon in it");
And in Access I think it is [disclaimer - I don't use Access much so this may be wrong]
OleDbCommand cmd = new OleDbCommand("SELECT * FROM TableA WHERE ColumnA = ? AND ColumnB = ?");
cmd.Parameters.Add("David's Data");
cmd.Parameters.Add("String with ; semi-colon in it");


I hope this helps.


Do you want to know more?


Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:38
david@mindplay.com21-Oct-04 12:38 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:45
Colin Angus Mackay21-Oct-04 12:45 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:55
david@mindplay.com21-Oct-04 12:55 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 11:52
Colin Angus Mackay21-Oct-04 11:52 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:22
david@mindplay.com21-Oct-04 12:22 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
Colin Angus Mackay21-Oct-04 12:28
Colin Angus Mackay21-Oct-04 12:28 
GeneralRe: Datasets - Totally Stumped - Am I stupid or something? Pin
david@mindplay.com21-Oct-04 12:43
david@mindplay.com21-Oct-04 12:43 
GeneralCheck hardware status Pin
unambiguos20-Oct-04 6:41
unambiguos20-Oct-04 6:41 
Generalproblem with execute storedproc Pin
Anonymous19-Oct-04 23:41
Anonymous19-Oct-04 23:41 
Generalolapcubebrowser Pin
Yulianto.19-Oct-04 19:36
Yulianto.19-Oct-04 19:36 
Generalrestricted data type attribute violation Pin
Tom Wright19-Oct-04 12:09
Tom Wright19-Oct-04 12:09 
GeneralStored Procedure Pin
cooldev19-Oct-04 11:55
cooldev19-Oct-04 11:55 
GeneralRe: Stored Procedure Pin
Colin Angus Mackay20-Oct-04 5:30
Colin Angus Mackay20-Oct-04 5:30 
GeneralRe: Stored Procedure Pin
cooldev20-Oct-04 5:34
cooldev20-Oct-04 5:34 
GeneralSQL Server access across a network Pin
StephenMcAllister19-Oct-04 9:55
StephenMcAllister19-Oct-04 9:55 
GeneralRe: SQL Server access across a network Pin
Colin Angus Mackay19-Oct-04 11:28
Colin Angus Mackay19-Oct-04 11:28 
GeneralRe: SQL Server access across a network Pin
ramkylaks19-Oct-04 12:51
ramkylaks19-Oct-04 12:51 

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.