[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Geert Maesele

7/23/2002 3:39:00 PM

Hi

Is there anyone how has already used the Microsoft ODBC .Net Provider to
access SQLBase?
I'm using it and it works quiet fine. But when I try to use parameters in
my SQL statements, errors appear..
Anyone who knows how to make that run??

This is my code:
parameterName = ":1"
strSql = "SELECT * FROM table1 WHERE begindate < :1 AND (enddate > :1)"

Dim dataCommand As Microsoft.Data.Odbc.OdbcParameter
dataCommand = New Microsoft.Data.Odbc.OdbcParameter()
dataCommand.DbType = DbType.Date
dataCommand.ParameterName = ":1"
dataCommand.Value = System.DateTime.Today.Date

Return databaseForODBC.GetDataTable(CommandType.Text, strSql, dataCommand)

This error is generated: "ERROR [42S02] [MERANT][ODBC SQLBase
driver][SQLBase]00601 DIC ITN Table has not been created"

All help is welcome!
Thanks in advance

Geert



3 Answers

Bob Beauchemin

7/23/2002 3:56:00 PM

0

Hi Geert,

Have you tried using '?' for parameter markers instead of SQL-92 (:1)
syntax?

Bob Beauchemin
http://staff.develo...


"Geert Maesele" <dequaja@NOREPLYyucom.be> wrote in message
news:udzCB5kMCHA.2100@tkmsftngp12...
> Hi
>
> Is there anyone how has already used the Microsoft ODBC .Net Provider to
> access SQLBase?
> I'm using it and it works quiet fine. But when I try to use parameters in
> my SQL statements, errors appear..
> Anyone who knows how to make that run??
>
> This is my code:
> parameterName = ":1"
> strSql = "SELECT * FROM table1 WHERE begindate < :1 AND (enddate > :1)"
>
> Dim dataCommand As Microsoft.Data.Odbc.OdbcParameter
> dataCommand = New Microsoft.Data.Odbc.OdbcParameter()
> dataCommand.DbType = DbType.Date
> dataCommand.ParameterName = ":1"
> dataCommand.Value = System.DateTime.Today.Date
>
> Return databaseForODBC.GetDataTable(CommandType.Text, strSql, dataCommand)
>
> This error is generated: "ERROR [42S02] [MERANT][ODBC SQLBase
> driver][SQLBase]00601 DIC ITN Table has not been created"
>
> All help is welcome!
> Thanks in advance
>
> Geert
>
>
>


Geert Maesele

7/23/2002 4:08:00 PM

0

Same error..

Could it be because I'm using SQLBase 7.0.1?



"Bob Beauchemin" <no_bobb_spam@develop.com> schreef in bericht
news:exEzlClMCHA.1624@tkmsftngp10...
> Hi Geert,
>
> Have you tried using '?' for parameter markers instead of SQL-92 (:1)
> syntax?
>
> Bob Beauchemin
> http://staff.develo...
>
>
> "Geert Maesele" <dequaja@NOREPLYyucom.be> wrote in message
> news:udzCB5kMCHA.2100@tkmsftngp12...
> > Hi
> >
> > Is there anyone how has already used the Microsoft ODBC .Net Provider to
> > access SQLBase?
> > I'm using it and it works quiet fine. But when I try to use parameters
in
> > my SQL statements, errors appear..
> > Anyone who knows how to make that run??
> >
> > This is my code:
> > parameterName = ":1"
> > strSql = "SELECT * FROM table1 WHERE begindate < :1 AND (enddate > :1)"
> >
> > Dim dataCommand As Microsoft.Data.Odbc.OdbcParameter
> > dataCommand = New Microsoft.Data.Odbc.OdbcParameter()
> > dataCommand.DbType = DbType.Date
> > dataCommand.ParameterName = ":1"
> > dataCommand.Value = System.DateTime.Today.Date
> >
> > Return databaseForODBC.GetDataTable(CommandType.Text, strSql,
dataCommand)
> >
> > This error is generated: "ERROR [42S02] [MERANT][ODBC SQLBase
> > driver][SQLBase]00601 DIC ITN Table has not been created"
> >
> > All help is welcome!
> > Thanks in advance
> >
> > Geert
> >
> >
> >
>
>


Bob Beauchemin

7/23/2002 5:26:00 PM

0

I don't have a copy of SQLBase 7.0.1 to be sure. You might try using ODBC
trace to see what ODBC command is being sent to SQLBase and compare it with
your Access test that works.

It also may be a problem in conversion of the date data type or using ":1"
for the parameter name (although the Odbc data provider doesn't use
parameter names). You might start by testing with a simpler data type
(varchar?) and alphabetic parameter name and see if this helps.

Bob Beauchemin
http://staff.develo...


"Geert Maesele" <dequaja@NOREPLYyucom.be> wrote in message
news:#9AL#IlMCHA.560@tkmsftngp08...
> Same error..
>
> Could it be because I'm using SQLBase 7.0.1?
>
>
>
> "Bob Beauchemin" <no_bobb_spam@develop.com> schreef in bericht
> news:exEzlClMCHA.1624@tkmsftngp10...
> > Hi Geert,
> >
> > Have you tried using '?' for parameter markers instead of SQL-92 (:1)
> > syntax?
> >
> > Bob Beauchemin
> > http://staff.develo...
> >
> >
> > "Geert Maesele" <dequaja@NOREPLYyucom.be> wrote in message
> > news:udzCB5kMCHA.2100@tkmsftngp12...
> > > Hi
> > >
> > > Is there anyone how has already used the Microsoft ODBC .Net Provider
to
> > > access SQLBase?
> > > I'm using it and it works quiet fine. But when I try to use
parameters
> in
> > > my SQL statements, errors appear..
> > > Anyone who knows how to make that run??
> > >
> > > This is my code:
> > > parameterName = ":1"
> > > strSql = "SELECT * FROM table1 WHERE begindate < :1 AND (enddate >
:1)"
> > >
> > > Dim dataCommand As Microsoft.Data.Odbc.OdbcParameter
> > > dataCommand = New Microsoft.Data.Odbc.OdbcParameter()
> > > dataCommand.DbType = DbType.Date
> > > dataCommand.ParameterName = ":1"
> > > dataCommand.Value = System.DateTime.Today.Date
> > >
> > > Return databaseForODBC.GetDataTable(CommandType.Text, strSql,
> dataCommand)
> > >
> > > This error is generated: "ERROR [42S02] [MERANT][ODBC SQLBase
> > > driver][SQLBase]00601 DIC ITN Table has not been created"
> > >
> > > All help is welcome!
> > > Thanks in advance
> > >
> > > Geert
> > >
> > >
> > >
> >
> >
>
>