473,795 Members | 3,002 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OleDb files needed?

I've made a small test program. I connect with oleDb (in fact sqlConnection
....etc) to a SQL-server.
It works fine at home.
But it did not work at another place, altough other simple C-sharp programs
work (CLR is installed).
But I tested overthere already with ODBC a connection (ms-access) to the
sql-server and that worked also.Is my connectionstrin g wrong or is more
needed?
Nov 15 '05 #1
8 1322
Hi,

I would double check the ConnectionStrin g , if you change of location
almost for sure the SQL server is a different server, if not maybe you don't
have access to it, try doing a "telnet SQL_SERVER 1433 " ( by default 1433
is the port of the SQL engine ) and see if you can connect, otherwise that
exception are you getting when trying to connect?

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Johan Goris" <jo*********@pi .be> wrote in message
news:D_******** *************@p hobos.telenet-ops.be...
I've made a small test program. I connect with oleDb (in fact sqlConnection ...etc) to a SQL-server.
It works fine at home.
But it did not work at another place, altough other simple C-sharp programs work (CLR is installed).
But I tested overthere already with ODBC a connection (ms-access) to the
sql-server and that worked also.Is my connectionstrin g wrong or is more
needed?

Nov 15 '05 #2
"Johan Goris" <jo*********@pi .be> wrote in
news:D_******** *************@p hobos.telenet-ops.be:
I've made a small test program. I connect with oleDb (in fact
sqlConnection ...etc) to a SQL-server.
Johan,

If you are using SqlConnection, you are not using OleDb. Components
in the System.Data.Sql Client namespace call SQL Server's "SQL Client"
interface directly, and do not go through OleDb.
It works fine at home.
But it did not work at another place, altough other simple
C-sharp programs work (CLR is installed).
What do you mean by "did not work"? Was there an error message?
But I tested overthere already with ODBC a connection
(ms-access) to the sql-server and that worked also.Is my
connectionstrin g wrong or is more needed?


Please post the connection string.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 15 '05 #3
bob
Have you tried updating your MDAC's
-----Original Message-----
I've made a small test program. I connect with oleDb (in fact sqlConnection....etc) to a SQL-server.
It works fine at home.
But it did not work at another place, altough other simple C-sharp programswork (CLR is installed).
But I tested overthere already with ODBC a connection (ms- access) to thesql-server and that worked also.Is my connectionstrin g wrong or is moreneeded?
.

Nov 15 '05 #4
The error : Application has generated an exception...
Proces id = Ox... Thread id =...

Connection String I used in SqlConnection: data source=SANOSERV ER;initial
catalog=Formule s;persist security info=False;user id=sa;workstati on
id=LABO;packet size=4096

I do not know at this moment what the connectionstrin g is in ODBC at the
other computer.

Regards.
"Chris R. Timmons" <crtimmons@X_NO SPAM_Xcrtimmons inc.com> wrote in message
news:Xn******** *************** ***********@207 .46.248.16...
"Johan Goris" <jo*********@pi .be> wrote in
news:D_******** *************@p hobos.telenet-ops.be:
I've made a small test program. I connect with oleDb (in fact
sqlConnection ...etc) to a SQL-server.


Johan,

If you are using SqlConnection, you are not using OleDb. Components
in the System.Data.Sql Client namespace call SQL Server's "SQL Client"
interface directly, and do not go through OleDb.
It works fine at home.
But it did not work at another place, altough other simple
C-sharp programs work (CLR is installed).


What do you mean by "did not work"? Was there an error message?
But I tested overthere already with ODBC a connection
(ms-access) to the sql-server and that worked also.Is my
connectionstrin g wrong or is more needed?


Please post the connection string.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/

Nov 15 '05 #5
"Johan Goris" <jo*********@pi .be> wrote in
news:JG******** *************@p hobos.telenet-ops.be:
The error : Application has generated an exception...
Proces id = Ox... Thread id =...

Connection String I used in SqlConnection: data
source=SANOSERV ER;initial catalog=Formule s;persist security
info=False;user id=sa;workstati on id=LABO;packet size=4096

I do not know at this moment what the connectionstrin g is in
ODBC at the other computer.


Johan,

The connection string looks OK. Is it possible for you to rebuild
the EXE with full debugging turned on? That would make the error
message give much more detail about the error when it occurs.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 15 '05 #6
Hi,

Try to do a ping to the server to see if there is connectivity. also as I
suggested before a telnet to the port 1433 could be useful.
and do a try catch block around the code and post the exception message

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
The connection string looks OK. Is it possible for you to rebuild
the EXE with full debugging turned on? That would make the error
message give much more detail about the error when it occurs.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/

Nov 15 '05 #7
Thank you Bob, that was the answer. I had to install MDAC 2.6 or later.
And now I do not have problems anymore.
"bob" <an*******@disc ussions.microso ft.com> wrote in message
news:2c******** *************** ******@phx.gbl. ..
Have you tried updating your MDAC's
-----Original Message-----
I've made a small test program. I connect with oleDb (in

fact sqlConnection
....etc) to a SQL-server.
It works fine at home.
But it did not work at another place, altough other

simple C-sharp programs
work (CLR is installed).
But I tested overthere already with ODBC a connection (ms-

access) to the
sql-server and that worked also.Is my connectionstrin g

wrong or is more
needed?
.

Nov 15 '05 #8
I have placed a try and catch block around the code.
It said that MDAC 2.6 or later needed to be installed.
So I did.
And it worked!
Thank you for the hint.
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > wrote
in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi,

Try to do a ping to the server to see if there is connectivity. also as I
suggested before a telnet to the port 1433 could be useful.
and do a try catch block around the code and post the exception message

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
The connection string looks OK. Is it possible for you to rebuild
the EXE with full debugging turned on? That would make the error
message give much more detail about the error when it occurs.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/


Nov 15 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
10889
by: Parking Meters | last post by:
Today I managed to get the OleDB provider to let me put datasets from an as400 using sql. Great, the provider string I used is: Provider=IBMDA400.DataSource.1;User ID=XXXXX;Password=XXXX;Data Source=nnn.nnn.nnn.nnn;"/> Question:
11
2038
by: Frank Xia | last post by:
When I try to build a oedb data connection, I got an error message saying "Invalid path or you have to connect to the server the database is resided". I can see dataset through Data - Preview dataset. I don't what could be the problem. Can soemone please help me with this ASP.net beginner's question? Thanks in advance for any help!
4
3075
by: Will Pittenger | last post by:
I have a project where the backend is Access. I have learned (slowly) to use OLEDB to access my data. However, to save changes, I need to generate a SQL statement. This seems clunky. I am used to MFC recordsets. The OleDB system will let me add the row to the rowset, but then does nothing with it. I have tried calling BeginEdit/EndEdit, AcceptChanges (from several different classes), System.Data.DataTable.Rows.Add, and...
0
2963
by: dim mzeura via .NET 247 | last post by:
(Type your message here) -------------------------------- From: dim mzeura I have the same problem too. Please help! System.Data.OleDb.OleDbException: Syntax error (missing operator) in query expression ''\\crwfs1\projects12\AP-Wilbur\Analysis_NonQuantitative\Damages_Report\Backup_Exhibits_Leitzinger's_Damages_Calculations', '328424' )'. -----Here is my code----
1
2411
by: svijay | last post by:
hi I have got a strange problem. May I know any solution for this. Here is the detailed description about the problem We have got a mainframe system and also production and development server.
2
4016
by: Miles | last post by:
I have a VB2005 application that has the need to read FoxPro 2.5 DBF/CDX files. I have the code (below) that opens the connection, but there are never any records, nor errors, reported... Can anyone tell me what I'm doing wrong? The ConnectionString resolves to "Provider=VFPOLEDB.1;Data Source=C:\test\REVFILEF.DBF;Mode=Read|Share Deny None;Collating Sequence=MACHINE" Private Function DoDBFProcess(byVal InputFileName as String) As Long
5
23202
by: Jesse Albert | last post by:
Hiyo, I'm trying to import a CSV file into a datatable using either ODBC or OLEDB. One of the columns contains an IP Address. For some reason, the IP address will not display correctly. All of the other information in the CSV is accurate. For example, 10.80.34.100 displays as 10.8034. All the IPs in the column are displayed like this.
0
1381
by: aloneball | last post by:
I have several Excel files which I need to import into a SQL server. I open each file using string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source = " + fileName + ";Extended Properties=\"Excel 8.0;HDR=No\""; OleDbConnection conn = new OleDbConnection(connectionString); conn.Open(); This works for a lot of the files, but apparently some of the files, it can't open throw'ing the following exception:
0
3977
by: mwenz | last post by:
I am trying to update an Access table using OLEDB in VB.Net 2005. I can add rows but I cannot update them. Code to instantiate the Access database and table... Dim conn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db.Name) conn.Open() Dim oda As New OleDb.OleDbDataAdapter("select " & sqlCols & " from ;", conn) Dim cb As New OleDb.OleDbCommandBuilder(oda) cb.QuotePrefix = "" oda.UpdateCommand =...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.