Click here to Skip to main content
15,796,025 members
Home / Discussions / Database
   

Database

 
AnswerRe: please help me figure out why the heck i can't change the primary key or drop the table in sql 2008 express Pin
Mycroft Holmes31-Jan-10 13:15
professionalMycroft Holmes31-Jan-10 13:15 
GeneralRe: please help me figure out why the heck i can't change the primary key or drop the table in sql 2008 express Pin
tonyonlinux31-Jan-10 14:20
tonyonlinux31-Jan-10 14:20 
GeneralRe: please help me figure out why the heck i can't change the primary key or drop the table in sql 2008 express Pin
Mycroft Holmes31-Jan-10 14:30
professionalMycroft Holmes31-Jan-10 14:30 
QuestionDo SQL server have some functions as like "Select bottom"? Pin
caiguosen30-Jan-10 22:10
caiguosen30-Jan-10 22:10 
AnswerRe: Do SQL server have some functions as like "Select bottom"? Pin
i.j.russell30-Jan-10 23:44
i.j.russell30-Jan-10 23:44 
AnswerRe: Do SQL server have some functions as like "Select bottom"? Pin
Mycroft Holmes31-Jan-10 1:00
professionalMycroft Holmes31-Jan-10 1:00 
AnswerRe: Do SQL server have some functions as like "Select bottom"? Pin
dan!sh 31-Jan-10 1:14
professional dan!sh 31-Jan-10 1:14 
QuestionWhy I can't search SQL database with WHERE with a text variable? Pin
Curious 200930-Jan-10 11:28
Curious 200930-Jan-10 11:28 
I am using VB.net and I have a SQL database table GuestInfo with 1 column Col1 defined as Text with allow NULL & another column Col2 defined as Int with allow NULL

If I use command:

cmd.CommandText = "SELECT * FROM GuestInfo WHERE Col2 = 12345"
Dim lrd As SqlDataReader = cmd.ExecuteReader()

- There is no error happen

But if I use:

cmd.CommandText = "SELECT * FROM GuestInfo WHERE Col1 = 'ABC'"
Dim lrd As SqlDataReader = cmd.ExecuteReader()

- There is an error pop-up said that text and varchar are incompatible operator

Then I tried the following:

Dim str As String

str = "ABC"

cmd.CommandText = "SELECT * FROM GuestInfo WHERE Col1 = '" & str & "'"
Dim lrd As SqlDataReader = cmd.ExecuteReader()

- There is a same error display

What can I do to search a Text value in column 1?
AnswerRe: Why I can't search SQL database with WHERE with a text variable? Pin
Mycroft Holmes30-Jan-10 14:03
professionalMycroft Holmes30-Jan-10 14:03 
GeneralRe: Why I can't search SQL database with WHERE with a text variable? Pin
Curious 200930-Jan-10 14:23
Curious 200930-Jan-10 14:23 
GeneralRe: Why I can't search SQL database with WHERE with a text variable? Pin
Mycroft Holmes30-Jan-10 16:31
professionalMycroft Holmes30-Jan-10 16:31 
GeneralRe: Why I can't search SQL database with WHERE with a text variable? Pin
Curious 200930-Jan-10 16:49
Curious 200930-Jan-10 16:49 
Questionnested procedure table Pin
Sasmi_Office29-Jan-10 20:45
Sasmi_Office29-Jan-10 20:45 
AnswerRe: nested procedure table Pin
Mycroft Holmes30-Jan-10 13:56
professionalMycroft Holmes30-Jan-10 13:56 
QuestionNeuroDegenerative Problem in SQL Pin
snouto29-Jan-10 19:45
snouto29-Jan-10 19:45 
AnswerRe: NeuroDegenerative Problem in SQL Pin
Mycroft Holmes29-Jan-10 23:26
professionalMycroft Holmes29-Jan-10 23:26 
Questionurgent : list all available instance on lan Pin
Vishal Saxena dev29-Jan-10 19:02
Vishal Saxena dev29-Jan-10 19:02 
AnswerRe: urgent : list all available instance on lan Pin
Vishal Saxena dev31-Jan-10 19:22
Vishal Saxena dev31-Jan-10 19:22 
GeneralRe: urgent : list all available instance on lan Pin
Mycroft Holmes31-Jan-10 19:28
professionalMycroft Holmes31-Jan-10 19:28 
GeneralRe: urgent : list all available instance on lan Pin
Vishal Saxena dev31-Jan-10 21:08
Vishal Saxena dev31-Jan-10 21:08 
QuestionUpdating Table Pin
vhassan28-Jan-10 16:14
vhassan28-Jan-10 16:14 
AnswerRe: Updating Table Pin
Luc Pattyn28-Jan-10 16:41
sitebuilderLuc Pattyn28-Jan-10 16:41 
GeneralRe: Updating Table Pin
vhassan28-Jan-10 16:56
vhassan28-Jan-10 16:56 
GeneralRe: Updating Table Pin
Avi Berger28-Jan-10 17:12
Avi Berger28-Jan-10 17:12 
GeneralRe: Updating Table Pin
vhassan28-Jan-10 20:55
vhassan28-Jan-10 20:55 

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.