|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL StatementsI am trying to extract data from a table with an SQL statements but it is not
working because of my "where=..." How do I use a decleared variable as my where, below is an example of my code... Dim datCurDate As Date Dim strISODate As String datCurDate = Now strISODate = Format(datCurDate, "yyyy-MM-dd") strSelectStr = New IBM.Data.DB2.iSeries.iDB2Command("select * from KITDATA.KMCAL where DATECL=" & strISODate, cn) When I write it like that it doesn't pull any data now sure how to attach the delcared variable to the "where". Thanks in advance where DATECL=' " & strISODate & " ' ", cn
VB .NET Rookie wrote: Show quoteHide quote > I am trying to extract data from a table with an SQL statements but it is not > working because of my "where=..." > How do I use a decleared variable as my where, below is an example of my > code... > > Dim datCurDate As Date > Dim strISODate As String > > datCurDate = Now > strISODate = Format(datCurDate, "yyyy-MM-dd") > strSelectStr = New IBM.Data.DB2.iSeries.iDB2Command("select * from > KITDATA.KMCAL where DATECL=" & strISODate, cn) > > When I write it like that it doesn't pull any data now sure how to attach > the delcared variable to the "where". > > Thanks in advance
Problem running query in code
Make the value of MyObjectA equal to the value of MyObjectB? System.Net.Sockets.SocketException Error How to go to the next control? Automate file downloads Newbie Missing Something with Access DB Update Using VB .NET setting form properties during runtime New line character converting bitarray to int64 Console application to generate Excel file |
|||||||||||||||||||||||