Click here to Skip to main content
15,917,610 members
Home / Discussions / Database
   

Database

 
GeneralRe: Please, Help me. I am really LOST Pin
Colin Angus Mackay2-Jan-06 2:40
Colin Angus Mackay2-Jan-06 2:40 
GeneralRe: Please, Help me. I am really LOST Pin
Rob Graham2-Jan-06 4:49
Rob Graham2-Jan-06 4:49 
GeneralRe: Please, Help me. I am really LOST Pin
S. Akif Kamal2-Jan-06 19:26
S. Akif Kamal2-Jan-06 19:26 
Questionado in pascal Pin
aspnet_221-Jan-06 9:09
aspnet_221-Jan-06 9:09 
AnswerRe: ado in pascal Pin
André Ziegler1-Jan-06 12:22
André Ziegler1-Jan-06 12:22 
GeneralRe: ado in pascal Pin
aspnet_221-Jan-06 22:58
aspnet_221-Jan-06 22:58 
GeneralRe: ado in pascal Pin
André Ziegler1-Jan-06 23:58
André Ziegler1-Jan-06 23:58 
AnswerRe: SQL Optimization Pin
Colin Angus Mackay30-Dec-05 9:00
Colin Angus Mackay30-Dec-05 9:00 
General[Message Deleted] Pin
VickyC#31-Dec-05 3:10
VickyC#31-Dec-05 3:10 
GeneralRe: SQL Optimization Pin
Paul Conrad2-Jan-06 12:09
professionalPaul Conrad2-Jan-06 12:09 
GeneralRe: SQL Optimization Pin
Paul Conrad2-Jan-06 19:14
professionalPaul Conrad2-Jan-06 19:14 
GeneralRe: SQL Optimization Pin
Paul Conrad13-Jan-06 14:45
professionalPaul Conrad13-Jan-06 14:45 
GeneralRe: SQL Optimization Pin
Dave Kreskowiak3-Jan-06 9:32
mveDave Kreskowiak3-Jan-06 9:32 
GeneralRe: SQL Optimization Pin
Paul Conrad3-Jan-06 9:36
professionalPaul Conrad3-Jan-06 9:36 
QuestionPreventing double column value Pin
gharry30-Dec-05 3:40
gharry30-Dec-05 3:40 
AnswerRe: Preventing double column value Pin
Colin Angus Mackay30-Dec-05 9:04
Colin Angus Mackay30-Dec-05 9:04 
QuestionSpecifying DSN in connection string Pin
Maqsood Ahmed29-Dec-05 21:03
Maqsood Ahmed29-Dec-05 21:03 
AnswerRe: Specifying DSN in connection string Pin
abhinish30-Dec-05 0:02
abhinish30-Dec-05 0:02 
QuestionReporting Services Programming Pin
mipooo29-Dec-05 18:10
mipooo29-Dec-05 18:10 
Questionbetter views or procedure? Pin
sasire1829-Dec-05 18:09
sasire1829-Dec-05 18:09 
AnswerRe: better views or procedure? Pin
Colin Angus Mackay30-Dec-05 0:46
Colin Angus Mackay30-Dec-05 0:46 
QuestionSpecified cast is not valid Pin
gharry29-Dec-05 9:38
gharry29-Dec-05 9:38 
Can someone help me with this one i have writen a function that retrieves a Id from a table but the result is not found and i get the above error.

Public Function getID(ByVal strTable As String, ByVal strValue As String) As String
Try
Dim IDConn As SqlConnection = New SqlConnection("server=localhost;uid=sa;pwd=;database=EventMngt")
Dim IDString As String = "SELECT Id FROM Boekelo_Horses WHERE Horse_Passport = '" & strValue & "'"
If strTable = "Boekelo_Riders" Then
IDString = "SELECT * FROM Boekelo_Riders WHERE Rider_FEIId = '" & strValue & "'"
End If
Dim IdCommand As New SqlCommand(IDString, IDConn)
IDConn.Open()
Dim IDReader As SqlDataReader = IdCommand.ExecuteReader()
IDReader.Read()
getID = IDReader.GetString(0)
IDConn.Close()
Catch ex As Exception
MessageLabel.Text = strValue & " is not on the DataFile, try again.<br>Error text:" & ex.Message
getID = "-error-"
End Try
End Function

If i comment out the getID = IDRea... line then the function returns no error, if in the function it produces a error. But why??
AnswerRe: Specified cast is not valid Pin
Colin Angus Mackay29-Dec-05 15:30
Colin Angus Mackay29-Dec-05 15:30 
GeneralRe: Specified cast is not valid Pin
gharry29-Dec-05 23:02
gharry29-Dec-05 23:02 
GeneralRe: Specified cast is not valid Pin
gharry29-Dec-05 23:44
gharry29-Dec-05 23:44 

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.