Win32::ODBC Connect To MSSQL

Apr 19, 2004

Hi,

I wanted to know if there is a way to connect to my MSSQL without having to setup a datasource in the control panel.

Perferably I want to locate the database within my perl code instead. I don't want to have to setup a datasource each time I need a different database. Perhaps there is a way to pass the name of the database along with the username and password through the command line.


Any suggestions?

Thanks.

View 5 Replies


ADVERTISEMENT

MSSQL ODBC Vs. ADO

Sep 17, 2004

We have in our applications written in VC++ access also to MSSQL but only over ODBC. Is there any performance difference (is ADO faster) between ODBC and ADO access? And if yes how much it could be ?
Thanks for your answer.

View 1 Replies View Related

MSSQL ODBC Question

Jul 11, 2006

I work with a FoxPro programmer who wants to use an ODBC connection from his foxpro inventory database to the websites mssql inventory database to do quanity+1 updates.

But he is not sure if OBDC (or MSSQL for that matter) supports those kind of updates (field+1 instead finding out what field value is and then incrementing it).

Can one of your pros confirm or deny this?

thanks!

View 3 Replies View Related

ODBC 3.x MsSql 2005

May 6, 2008

First off, Devshed is a great place to find information for development. I'm on here daily looking through threads, finding answeres

I'm building a backend for a program that uses msSql 2005 and ODBC .
I'm trying to insert into a table, and it is working, but i would like to find a solution to this error i get from the odbc trace:

Calc f54-5c4ENTER SQLExecute
HSTMT 00924A18

Calc f54-5c4EXIT SQLExecute with return code -1 (SQL_ERROR)
HSTMT 00924A18

DIAG [22018] [Microsoft][SQL Native Client]Invalid character value for cast specification (0)

when i try to insert a value of 0 (zero) into a column that is bound as a double it gives this error.

And one more thing:
if(retcode != SQL_SUCCESS | SQL_SUCESS_WITH_INFO)

shouldnt that work? (if Retcode isnot success OR success_with_info)

Any input would be greatly appreciated!
thanks

View 2 Replies View Related

How To Get Server Name? (Using VC++, MSSQL && ODBC)

Jun 9, 2006

Hi. Is there a way in order to get the Server name using MSSQL ODBC in Visual C++? Here's my code:

CString wstr_connect ;
wstr_connect.Format( "DSN=%s;UID=%s;PWD=%s", gstr_DBName, gstr_UserID, gstr_Password ) ;
CDatabase mydb ;
BOOL ret = mydb.OpenEx( wstr_connect, CDatabase::noOdbcDialog ) ;
CString info = mydb.GetConnect( ) ;

GetConnect only returns the database name, user ID, password and WSID. How do i get the server name?

Thanks in advance!

View 4 Replies View Related

MSSQL ODBC And Transactions

Feb 20, 2008


Hi There,

I have developed the ODBC app which can work with Oracle as well as MSSQL server databases. I need to use transactions at some level. By setting AUTOCOMMIT OFF and using SET TRANSACTION and BEGIN WORK, COMMIT WORK everything works fine with Oracle. But with MSSQL server does not. Do I need to code something special for MSSQL? Does anyone has example on how to implement transactions with MSSQL server using ODBC?

I tried reading lots of documents on Microsoft site but nothing specifically says how to do this. One way the doc says is using SQLSetConnectAttr with SQL_ATTR_TXN_ISOLATION but does not specify how to.

Any help with appreciated. Thanks in advance.

Milind

View 4 Replies View Related

MSSQL ODBC And Transaction

Feb 20, 2008

Hi There,

I have developed the ODBC app which can work with Oracle as well as MSSQL server databases. I need to use transactions at some level. By setting AUTOCOMMIT OFF and using SET TRANSACTION and BEGIN WORK, COMMIT WORK everything works fine with Oracle. But with MSSQL server does not. Do I need to code something special for MSSQL? Does anyone has example on how to implement transactions with MSSQL server using ODBC?

I tried reading lots of documents on Microsoft site but nothing specifically says how to do this. One way the doc says is using SQLSetConnectAttr with SQL_ATTR_TXN_ISOLATION but does not specify how to.

Any help with appreciated. Thanks in advance.

Milind

View 3 Replies View Related

MSSQL 2000 ODBC Driver

Apr 11, 2005

Hello,

I normally use Microsoft Access to retrieve data , via ODBC connection, from a table in a SQLserver database. One of the fields in the table has a value 1 but at times when the data is retrieved into MS Access it turns out to be 100 in Access. Moreover, when I try to change it in Access my computer hangs or it takes a long time before the change is effected. It does not matter from which client Pc this action takes place it remains the same. I am using ODBC SQLserver ODBC driver version 2000.81.9042.00.

I would be grateful if you could help me out of this strange situation.

Regards,

Albert

View 4 Replies View Related

MSSQL && ODBC Float Problem

Sep 27, 2007

Hi,

I am having problems using MSSQL Express with ODBC. I am trying to retrieve a float field from the MSSQL server, but the value I get is corrupted (or at least approximated wrong). For instance, the value I want to retrieve is 59.457443, but what I actually get is 59.457442999999998. This only happens if I connect through ODBC. I did some tracing with ODBC and I've noticed that it's not a problem in my code, since the wrong value is what is actually extracted from the database. Following is an extract from the log file.

a88-ec EXIT SQLGetData with return code 0 (SQL_SUCCESS) HSTMT 03C62918 UWORD 5 SWORD 1 <SQL_C_CHAR> PTR 0x0415EB30 [ 18] "59.457442999999998" SQLLEN 50 SQLLEN * 0x0415E720 (18)


I am wondering if I overlooked something configuration-wise of if this is a bug in the driver? Any help would be greatly appreciated.

EoF

View 4 Replies View Related

MSSQL 2000, ODBC, Tempdb, Locking

May 14, 2002

Hi, I wonder if anyone can shed some light on this issue -

We have a client/server program for MSSQL7 and MSSQL2000.
When running client/server - we have our own broker, etc,
the program ends up locking itself on SQL2000; this is not a problem on SQL7.
We noticed that it seems some system tables locking tempdb.
We also noticed that SQL2000 no longer has insert-into/bulkcopy option like SQL7. But, here we don't have temporary tables at all. It's just that we found the lockings in tempdb caused by some sysobjects, sysindexes, etc.
Also, this does not happen to all the systems we have. Some of our machine does not have the self-lock problem; most of the machines have this problem though.

If we don't run client/server, then the program works fine.
Same logic, the difference is when we use client/server logic to connect to the remote SQLServer 2000 server, the locking might happen on most of our machines.

Anyone is familiar with tempdb and locking issues, please provide some hint??? Is it possible that there are some system parameters that we can set to avoid the problem. We haven't found out why some of our machines do not have problem, while most of the machines have this locking problem.

The program is written using ODBC.

Many thanks in advance.

HIBA International

View 2 Replies View Related

MSSQL ODBC Difference Compared To MySQL

Mar 6, 2007

The source for this problem can be found http://www.wellytop.com/SQLProblem.zip

This test creates two threads each with a database connection and uses transactions to insert values into the same table.
The objective of this test is to check that a thread cannot read the results from a pending transaction on a different thread.
In effect this checks dirty reads do not happen and transaction locking.

The test runs correctly and displays "PASSED" with MySQL indicating the transaction and threading worked.
When running with MSSQL Express 2005 it reports a deadlock error during a transaction.
It's not really possible to re-run the transaction and I would like MS SQL to operate similar to MySQL, i.e. MySQL waits for the other transaction to finish before the next transaction can operate on those table rows. I'd like to use MSSQL but I am wondering why this error doesn't happen with MySQL and so have, for the moment, chosen to use it as my preferred database solution.
I have experimented with transaction isolation levels and this doesn't seem to solve the problem.

I've tested this with a fresh install of Windows XP SP2 and no firewall turned on.

To run this test with MSSQL Express2005 use the ODBC Data Source Administrator (odbcad32.exe) to create a data source named MyExpressTest and attach this to an empty database that has been created with the default values. Enable the #define MSSQL in the coude otherwise it tests with MySQL.


To run this test with MySQL (to show how this test should work) use the ODBC Data Source Administrator (odbcad32.exe) to create a data source named mySQLNewTest and attach this to an empty database that has been created with the default values. Comment out the #define MSSQL to switch to MySQL mode.

View 6 Replies View Related

Girl In Need! Anyone Do This: Unix Client -&> ODBC -&> MSSQL Server

Jul 28, 2004

Anyone support a config where you have an unix/linux (AIX here) ODBC client connection to SQL Server database? I am looking for a simple, supportable configuration that does not require me to learn perl or instal a bunch of crap gnu shareware on enterprise class machines.

Please help!

View 2 Replies View Related

MSSQL ODBC (SQL) Connection Issue (sqlstate 2800)

May 27, 2006

I am trying to make an ODBC connection to a MSSQL 2K server on a remote machine. I am using the SQL Server driver and can see the server in the drop down list when asked which server I would like to connect to. I am using SQL authentication over TCP/IP.

The error occurs when ODBC tries to connet to SQL server to obtain the default settings. The error I receive is as follows:

Connection Failed;
sqlstate '28000';
sql server error: 18456;
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'XXXX'

I have tried setting up alternate SQL Server users with varying security rights on the server but am not able to setup the ODBC connection.

I am setting the ODBC connection up on a windows XP SP2 machine.
The remote server is running Windows server 2003 (patched upto date) and MS SQL server 2K (SP3). The connection is over a LAN and does not pass through any firewalls (hardware or software). I can create the ODBC connection without issue locally on the server.

This is my first time creating an ODBC connection to a Windows 2003 Server and I am wondering if there is some additional config I may have missed out.

Many thanks.

View 3 Replies View Related

Distributed Transaction Trough ODBC From MSSQL To Oracle

Apr 14, 2007


I lost few days to solve a problem regarding the connection to an Oracle database server (10) with goal to execute a distributed transaction.

The environment was:

Windows Server 2003 Standard
MSSQL Server 2000 Standard
Oracle 10g Production Edition

The connection was quite easy to make with the Microsoft driver, but the error was:
Server: Msg 7391, Level 16, State 1, Line 3
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].

I tried to use the oracle odbc driver, but all kinds of errors were raised, regarding the TNS name and stuff like this. The real cause was that when you create the linked server you must to check the €œAllow inbound process€? in the provider options.

The Oracle ODBC driver allow distributed transactions.

View 1 Replies View Related

Connect MSSQL Without VPN

May 24, 2007

Hi All,

I have a mssql server that is located somewhere and i can only able to access it with my pc mssql when VPN is connected. Is there any solution/configuration that can let me to access the it without connecting to the VPN?
Please advice.

View 4 Replies View Related

Can Not Connect To Mssql With Php

Jun 6, 2007

Using mssql_connect($server, $user, $password) results in different ways the 'php server'

connects to the sql server.

On a workstation with WinXPProf, php uses the $user and $password to login and uses the

sql server authentication. Running the same script from a W2K3 server results in an error

because in this case the 'php server' tries to connect to the sql server using windows

authentication. (I have checked this difference with wireshark)

The problem has nothing to do with the sql server settings (mixed mode) / firewalls /

php.ini- file settings or versions of ntwdblib.dll because these are the same for both

connections. The problem looks more fundamental, probably due to settings in windows or

the iis version running on the server and the workstation.

Does anyone has a clue how to force php to use sql server authentication.



Pitching Theo pitcher_32@hotmail.com

View 2 Replies View Related

Simplest Way To Connect To Mssql Db

Jan 22, 2007

I'm an absolute beginner in asp/asp.net. You have been warned.
I managed to run and compile asp.net using win xp home edition, via Visual Web builder 2005 express edition. I managed to use its tools to create a test database and table and put values in it.
Now I wish to connect to this db using my aspx page. While fiddling around I finally able to drag the "table" icon on the database pane into my aspx page and it generate a code snippet below:
    <div>        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"            EmptyDataText="There are no data records to display.">            <Columns>                <asp:BoundField DataField="US_ID" HeaderText="User id" SortExpression="US_ID" />                <asp:BoundField DataField="US_NAME" HeaderText="USer Name" SortExpression="US_NAME" />            </Columns>        </asp:GridView>        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:nepConnectionString1 %>"            ProviderName="<%$ ConnectionStrings:nepConnectionString1.ProviderName %>" SelectCommand="SELECT [US_ID], [US_NAME] FROM [USER]">        </asp:SqlDataSource>    </div>
 When previewed in the browser, it seems to show the content of the db table. 
What I want to know is a sample coding on how to connect to the db the usual way (initialise the connection string, prepare and execute the query, fetch the content of resultset). Based on the code snippets above (it contains the info about the db name, table name and the column name I'm using), can anyone guide me by providing the lines of codes that retrieve the data?
 Basically the first thing I would like to do is fetching the data to be compared with user name and password submission after they click on login, among other basic stuff, which doesn't require bells and whistles like <gridviews> and other contraptions provided.
And another thing, would the connection string or other parameters be any different from my computer if I were to upload my aspx page including the mssql db file into my webhosting to be tested live?
Thanks for anyone out there willing to provide some hand-holding here! 
 
 
 
 
 
 
 
 
 

View 2 Replies View Related

Best Way To Connect To A MSSQL Database

Nov 6, 2007

 Hello,Is it better to use a DSN connection or using a connection string  Set Connection = Server.CreateObject("ADODB.Connection")  Which is easier to use and more reliable? Also could I have all the connection info on one page and then just include it with a include statment everytime I need to query the database?? Thank you, Rich    

View 4 Replies View Related

Cannot Connect With ODBC Using TCP/IP??

Oct 25, 2005

Win 2003 Small business server with IIS being used as a web server.
Our client app can log in and run queries, but our web app when trying to log in gets the message,
'SQL server does not exsist or access denied'
The system DSN's are both sql drivers and the configuration is name pipes. Our recomended specs use TCP/IP, but when I try to change it, it craps out on me. He's opened up his firewall completely to this new box and his old box, a Win2k machine can connect using TCP/IP. This machine is in a work group.
Any suggestions on what it might be??? :confused:

View 1 Replies View Related

Connect Via Odbc

Jan 3, 2007

i have an sql express db on my webserver.
now from another computer I am trying to creat an odbc connection to the sql server but when I enter in just the ip and the login and password it fails.
Please advise me what I can do?

what i really am trying to do is set up an access db on my home computer to be linked to an sql server express backend.
I thought to do this with odbc - is this the correct way?

View 14 Replies View Related

How To Connect Via ODBC

Nov 21, 2006

Hi,

I would like to connect in SqlServer 2005 via ODBC SQLServer, how are the steps?

1 - How can I connect ODBC?

1.1 - I need SqlServer 2005 name - ok

1.2 - Which option should I take in order to login? Windows NT authentication or Sql Server authentication?

Which one is the best option?



Cheers,

Alessandro

View 4 Replies View Related

Attempt To Return Record Set In INSERT...EXEC Statement From ODBC Source(non MSSQL)

Jan 17, 2007

Greeting.

I use OdbcConnection inside clr procedure, for getting data. If I use simple EXEC dbo.clr_proc - all is OK. If I use INSERT...EXEC I recive error message: Distributed transaction enlistment failed.

I set MSDTC security options for No Authentification and Allow inbound and Allow outbound, but it's no use.

Have this problem solution? May be, I must use another method to get my data?



P.S. Linked Servers and OPENQUERY is not applicable. Sybase not describe columns in stored proc result set and one stored proc may return different result set by params.

P.S.S. Sorry for bad english.









View 1 Replies View Related

How Many Users Can Connect To One Database In MSSQL

Nov 7, 2001

Dear Sir,
Can you please let me know as to how many users can MSSQL support at one time on a single database say test.

Thanks
Aman Gupta

View 2 Replies View Related

How To Connect To MSSQL Server From HP-UX Environment

Oct 9, 2006

Hi,Please confirm.. is it possible to connect to MSSQL server by executinga shell script on HP-UX (UNIX) platform.Regards,Uncle Sam

View 3 Replies View Related

FILE DSN On UNIX To Connect To MSSQL

Sep 19, 2007

Hello experts,

I need to create a File DSN on AIX Unix server which can connect to MS SQL server 2005 on a windows machine.Can anyone please give me step by step procedure how to do it.Its an urgent requirement. Please help me.

Regards
Arvind L

View 3 Replies View Related

Connect From ASP To SQL Server Through ODBC

Apr 12, 2004

Hi there,

I'm a new comer to this APS language and hope sombody out there can help me with this
I'm trying to find codes for me to connect from ASP to Sql Server using ODBC.
Can anyone help me
Thanx

View 2 Replies View Related

Connect To ODBC Driver

Feb 9, 2007

Could someone tell me how to use a query with a "connection string" to connect to an ODBC driver and retrieve data from its tables. I am new at this and have been having a lot of trouble connecting from the SSIS manager. If someone has a tutorial on how to do this. I would really appreciate it.

Thanks

View 3 Replies View Related

I Can't Connect To Server Through ODBC....

Jan 7, 2008

Hi all
I have problem with making Connection between two computer through SQLServer and ODBC.

I have two computers which are members of a WorkGroup network with WindowsXP(sp2) installed.
on one computer i have installed SQL Server 2000 Enterprise edition with MIX Authentication mode enabled. Also i have created a LOGIN (Sql Server Authentication) with System Administrator ROLE (SYSADMIN).in that sql server environment .

But in another computer when i want to create an ODBC connection (ControlPanelAdministrative ToolsData Sources (ODBC)) to connect to mentioned Computer with Sql server,I receive the following Error:
Access Denied...Sql Server doesn't exist.

I have disabled Windows-XP firewall on both computers but still problem persists.
By the way these two computer have one Administrator Account with DEFFERENT Passwords.

Could anyone help me.? Any help greately would be appreciated.

Kind Regards.

View 2 Replies View Related

Connect To MSSQL2005 Via ODBC

Dec 12, 2005

Installed SQL2005, connect via (the new) SQL Nativ Client ODBC Vers. 2005.90.1399.00 works, just as (the old) SQL Server ODBC-Driver 2000.85.1117.00. Works fine.

View 7 Replies View Related

ODBC Connect Failed In SQL Job

Jan 2, 2007

I am running SQL Server 2000 sp4 in Win Server 2003. I have a DTS
packages which connects to FileMaker 6 files via the ODBC driver
installed with FielMaker.

The DTS packages work correctly when
executed directly. However, when executed from a SQL Server Agent job,
the same DTS packages fail. Always with the same message:

Error: -2147467259 (80004005);
Provider Error: 16394 (400A)
Error string: [FileMaker][ODBC FileMaker Pro driver][FileMaker Pro]Connect failed
Error source: Microsoft OLE DB Provider for ODBC Drivers


Searching
for info on the above message seems to indicate a permissions problem.
However, I am running the jobs with an full administrator account. All
connections and the FielMaker files reside on the one server.

Any help on this would be greatly appreciated.

Thank you.

View 4 Replies View Related

MSSQL 2000 - Cant Connect To DB From Remote Computer

Jun 21, 2006

Please bare with me as I do not have much knowledge in this area with MSSQL.

I have installed MSSQL 2000 Developer and I have setup a database which I am able to connect to and work fine with from the actual server MSSQL is installed on.

The problem comes in when i try to connect to that same database from a different remote server. It will not connect to the DB from this remote server but I know all the connection information is correct so its something on the MSSQL DB server causing this and not on this remote server.

Someone I know has had this problem and has fixed it but they wont tell me how. All I know is they said something about manually opening the ports on the MSSQL server and he also said when you set it to dynamicly determine the port that MSSQL is listening on it errored out. however if you set it staticly to 1433 it worked fine.

Ive also installed SP4 in attempt to fix this but no luck with that either. And I can also get the same exact remote server to connect to completely different DB server without issues.


If anyone can please help walk me through this I would be greatly appreciate and I am also willing to pay some money if it will make my life easier.

View 6 Replies View Related

Unable To Connect To Mssql Server Using Sql Express

Oct 13, 2006

Hi,

I installed Sqlexpress server 2005 and am able to connect to the server using the sqlexpress manager.

The connection parameters are:

server: 127.0.0.1 (This is an alias name pointing to TMD03SQLEXPRESS)
username:sa
password:test
mode: sql server and windows authentication mode
TCP/IP : enabled and listening on port number 1433.

But I am not able to connect to the server using PHP's mssql_connect function.

I tried various combinations like

mssql_connect("127.0.0.1","sa","test")
mssql_connect("local","sa","test")
mssql_connect("localhost","sa","test")
mssql_connect("TMD03SQLEXPRESS","sa","test")
mssql_connect("127.0.0.1,1433","sa","test")

but none of them works. I also tried OSQL and SQLCMD and they don't work either. They give me the following error message.

[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [2].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.

Can anyone please let me know what am doing wrong here?

Regards,
Celia

View 12 Replies View Related

Connect To Remote MYSQL From The Local Mssql

Dec 21, 2007

how ?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved