Friday, January 13, 2006 7:03 PMHi,
we are going from:
.NET --ODBC--> ODBC-JDBC Bridge--> JDBC Driver for SqlServer --> SqlServer
Everything works however creating temporary tables is failing:
CREATE TABLE #tempDefault (
a work around would be to use declare table:
DECLARE @tempDefault TABLEThis works however inserts into the declared table throw an exception:
INSERT INTO @tempDefault values (‘1’, ‘2’)
INSERT INTO @tempDefault
WHERE HostID = @HostID
Microsoft.Data.Odbc.OdbcException: ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this functionAnyone got ideas on a work around? or know why these calls don't work through JDBC?
Saturday, January 14, 2006 5:17 PMModerator
Could you just post how you call this script to execute ?
It would be nice to the batch as a whole, rather than only these snippet, thanks.
HTH, jens Suessmeyer.
Monday, January 16, 2006 6:07 PMHi Jens,
Here is the code that is run:
dim cmd as OdbcCommand = conn.CreateCommand
cmd.CommandText = sql
cmd.Connection = conn
cmd.CommandType = CommandType.StoredProcedure
Dim reader As OdbcDataReader = cmd.ExecuteReader()
dt = CreateDataTable(reader)
dim dr as DataRow = dt.NewRow
For i as Integer = 0 to (reader.FieldCount -1)
dr(i) = CType(reader.GetValue(i),Object)
Catch e As Exception
Monday, May 08, 2006 10:55 PMFYI, the resolution of this problem was the bridge. The bridge had some issues with the calls and after contacting the vendor I was able to resolve this problem.