| Returning Row ID (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I am attempting to add a new row to a PostgreSQL database table, but wish to obtain the resulting (automatically incremented) row ID for use in a second query. The code below is used to perform the insert, but does anyone know how the output generated (ref http://www.postgresql.org/idocs/index.php?sql insert.html) from the INSERT query can be obtained? Thanks, Marc Woolfson /* string with which to... |
|
| FoxPro Update Using CommandBuilder Error (6 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I'm getting the following error, ERROR [22018] [Microsoft] [ODBC Visual FoxPro Driver]Data type mismatch, when trying to update a FoxPro database using the ODBC provider. Has anyone gotten this to work??? Any suggestions would be greatly appreciated. Here is my code: Dim da As New OdbcDataAdapter() Dim ds As New DataSet() Dim cn As New OdbcConnection() Dim cb As New OdbcCommandBuilder() cb.QuotePr... |
|
| ADO.NET and Excel 3.0 format (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Gud day, Hi, i have a problem in reading Excel 3.0 format file using ODBC.NET Data Provider (Even OleDb.Net), can anybody in this forum help me to construct a sample ADO.NET snippet that can load Excel 3.0 file and return a dataset? Upgrading to 2000/XP is not my option. If it is, i have no problem at all. Thanks. |
|
| Connecting to a System DSN?! (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Hi, I have a problem about how to do a connection to a microsoft access database through an ODBC System DSN. When I try to do it with OleDB it says that it doesn't support it. I have also tried to download and use the ODBC .NET Data Provider, but the JET (Microsoft Access) provider there only lets you specify an absolute path to the *.mdb file and I want to specify a system dsn. Please let me know... |
|
| System error when connecting to Notes or Access (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| When trying to connect to Notes I receive an error message saying "An unhandled exception of type 'Microsoft.Data.Odbc.OdbcException' occurred in 'Microsoft.data.odbc.dll'. I'm using Notes SQL 3.01a ODBC driver. I've tried connectionstrings with DSN , FileDSN as well as the full connectionstring from MSDASC.DataLinks. Also I've tried on three computers receiving the same error message. From previo... |
|
| Problem with updating when 'desc' is a column (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| We're having serious problems using a DataAdapter to update a set of changes we've made to a table within a dataset. We are connecting to a Sybase database and one of the field names is "desc". (Unfortunately, we cannot just rename the field since a different client/server app uses that field also.) We get the following error when we go to try to update... System.Data.OleDb.OleDbException: Syntax ... |
|
| Integer becomes double: create table (dbase) (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Hello: I'm using the CREATE TABLE sql command with odbc dbase driver (*.dbf). How do I create a integer column? My test below creates a double, in the first column, instead of integer. Thanks for any help Karl string sql "CREATE TABLE test" " (myInt int, myFloat float, myString Char(32))"; // I even tried short but still get double. string strAccessConn @"Driver {Microsoft dBase Driver (*.dbf)};DB... |
|
| Inserting a datatable into a nested dataset... help (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Ok here is what I've got: Dataset DataTable1 DataTable2 DataTable3 /Dataset I want to add a table at run time like below: Dataset DataTable1 DataTable2 DataTable4 DataTable3 /Dataset I tried to create a field in DataTable2 and set it to my new table. That didn't work. Anyone have a good idea? |
|
| Problems with Microsoft.Data.Odbc package en C# (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| try { Microsoft.Data.Odbc.OdbcCommand SqlCommand new Microsoft.Data.Odbc.OdbcCommand (); SqlCommand.CommandText dbEnregistrement.sqlInsert; SqlCommand.Connection this.mConnectionProvider.connection; SqlCommand.CommandType System.Data.CommandType.Text ; SqlCommand.ExecuteNonQuery() ; this.mSortedList.Add( dbEnregistrement.sqlPrimaryKey, dbEnregistrement ); } catch (DBEnregistrementException eEnregi... |
|
| Database Connections - Toolbox or Code? (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I am just teaching myself how to program using Visual Studio .NET (currently working with VB.Net) and am getting differing options from the books. I would like to know the pros and cons of interacting with a database either thru code or by using the Toolbox and then setting the properties of those items to link to the information you want from the database? TIA Greg Hicks VB Newbie |
|
| help with odbc please (4 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Ok, I think I am lost, I have followe the instructions that microsoft has to a T and can't figure this out. I want to make a standard ODBC connection and downloaded from microsoft the odbc.net install. It says in the instructions to use Imports Microsoft.Data.Odbc but this fails do to the fact it says it is not supported by the Imports Microsoft I then decided, ok, lets use the ADO connection, see... |
|
| ODBC.NET Connection.Open hang after exception is thrown (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| ODBC.NET database rpovider was working fine till we start load test our application. When we are increasing number of open connections, eventualy it cause that Connection pool reject attemt to create new connection. Once it is happens OdbcConnection object is hang on the Open mehtod... I was trying to set ConnectionTimeout to 5, 10 or default 15 sec, but it always hang on this line. dbConnection.O... |
|
| ODBC Connection to Sybase (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Hi folks, I'm connecting to sybase via ODBC. I've created the DSN, and tested it with "Query Tool (using ODBC)". It connects without a problem. When I try to simply connect and bind to a datagrid, I get a "server not found" error. Here's my code behind: Public Class WebForm1 Inherits System.Web.UI.Page Protected WithEvents MyDataGrid As System.Web.UI.WebControls.DataGrid Protected WithEvents Outpu... |
|
| unrecognized SQLState (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I'm connecting to a progress database via odbc.net using an openlink driver. I configured the System DSN of my server and it works fine when I test it within a winform application, but when I apply this DSN to a webform(aspx) the following weird error occurs(unrecognized SQLState): Exception Details: Microsoft.Data.Odbc.OdbcException: ERROR [Dïª] My code (C#): using Microsoft.Data.Odbc; OdbcConnec... |
|
| Compacting an Access2000 Database (4 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Is there a programmatic way for compacting an Access 2000 database in .NET using DataCommand objects (OleDBCommand)? I'm using Jet OLEDB 4.0 as my provider. Back in VS6 I was able to compact databases by using the DAO Workspace::CompactDatabase() method. I haven't been able to find the equivalent in .NET. Thanks, Joe |
|
| Open an odbc connection in a web sevice project (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Hi, I try to open a connection with Ms access using a DNS in the connection string. here is my webmethod: WebMethod(Description: "Open an ODBC connection with DSN") Public Function RetrieveCustomers() As String Dim MyConnection As OdbcConnection Dim MyAdapter As OdbcDataAdapter Dim MyDataset As DataSet Dim connectionstr As String sqlstr "SELECT * FROM T Customer;" connectionstr "dsn dbtest" MyConn... |
|
| .NET and MSAccess database == SLOW (6 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I'm considering migrating an application to .NET but I'm finding it takes about 10 times longer to write records to an Access db than my VS 6 app which used DAO. For my .NET test I'm using OleDbConnection and OleDbDataAdapter classes as follows: WriteRecords() { oleDbConnection1.Open() for {each record} oleDbDataAdapter1.InsertCommand.CommandText "INSERT INTO ...." oleDBDataAdapter1.ExecuteNonQuer... |
|
| how to insert BLOB? (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I'm trying to insert a new row that contains BLOB data larger than 8000 bytes. I've packaged my data into a byte[], created an OdbcParameter with the appropriate name and with this array as the value. I've set the OdbcType to OdbcType.VarBinary. When I execute a command using this parameter, nothing happens to the database. I can't figure out what happens with the application no exception is throw... |
|
| Detecting "raiserror" from stored procedure (3 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I have an application that runs a stored procedure in Sybase. I originally used the OleDb classes, but because of flakiness in the Sybase OLE DB driver, I'm looking at switching to ODBC. It seems to work OK, except that when the stored procedure does a "raiserror", there is no exception thrown. With OleDb, this would throw an OleDbException with the text passed to raiserror in the Message property... |
|
| Handling null values in .NET (5 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I have an MSAccess database table that contains string and numeric columns. For some rows, sometimes, some of the columns contain null values. Having used Server Explorer in VS.NET, I now have a strongly typed dataset and the necessary OleDbDataAdapter. After the call to Fill when inspecting the data set in the debugger, all of the null fields (string and int) have the message: " error: an excepti... |
|
| Why is Oracle Managed Provider is SLOWER than ODBC.NET? (See the included procedures.) (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I have the following 2 procedures the return a DataTable. The first one uses ODBC.NET and takes 5 seconds for a table that has 13,000 records. The second procedure uses Oracle Managed Client and takes 20 seconds. I also have one that uses OleDB and takes 16 seconds. I thought Oracle Managed Client will be the fastest of all. According to my test ODBC.NET is the fastest, OleDB is second and Oracle ... |
|
| Access memo field problems (2 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I am trying to run a select query against an Access 2000 table that contains a text field, a number field, and two memo fields. As long as I leave the memo fields out, everything does fine. If I include the memo fields, my query returns the following error: I am using the ODBC.NET client in an ASP.NET application. I am using the following code: Dim dsChildren As New DataSet() Dim NewRow As DataRow... |
|
| Can I list the Tables from any ODBC Datasource? (3 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| Dear All, I have started using ODBC for .NET and I use the registry to enumerate the DSN names on a local machine then when a user has selected the DSN name I want to be able to list the Datatables available through that DSN. I have seen some examples but none work with ODBC connections they all use OLEDB schema requests. Can anyone help? Thanks in Advance Richard |
|
| OleDbCommandBuilder (3 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| The following C# code generates the exception: "Syntax error in INSERT INTO statement". I tried it with the explicit definition of an InsertCommand (see commented code just above the Update call) which generated the exception: "No value given for one or more required parameters." Any ideas? Thanks for any help. Kristin Kristin Barker Principal Software Engineer NatureServe (www.natureserve.org) Ar... |
|
| How to connect to MySQL? (5 replies) |
| microsoft.public.dotnet.framework.odbcnet |
| I used to work a lot with MySQL in vb6, now I'm migrating to vb.net, but I have some difficulties connecting to MySQL. Can somebody please show me some working code? I tried ByteFX (http://sourceforge.net/projects/mysqlnet/) This is my code: ************************* Dim str As String Dim mConn As MySQLConnection mConn New MySQLConnection("DATABASE SiteTracker;Driver mysql;SERVER localhost;UID ham... |
|