Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Monday, March 26, 2012

Microsoft S1-DMO(ODBC SQL State:42000)

The bacend-up database has on-disk structure version 539.The server supports version 515 and cannot restore or upgrade this database.Originally posted by maheedhar
The bacend-up database has on-disk structure version 539.The server supports version 515 and cannot restore or upgrade this database.|||Ensure the source and target SQL server's version & collation settings are similar.

If not you can use DTS to import/export the data alone.

Friday, March 23, 2012

Microsoft OLE DB Provider for ODBC Drivers error 8007000e

Microsoft OLE DB Provider for ODBC Drivers error '8007000e'
[Microsoft][ODBC Microsoft Access Driver] System resource exceeded

I recieve this error every time I execute SQL statement form ASP page on an Access database.
Could any one help me diagnosing this problem and how to avoid seeing such error messages.

ThanksI FOUND IT!
I FOUND THE SOLUTION.

If there is any one interested in this subject or suffering from it, contact me and I will tell him about the million dollar problem solution.

:p|||Originally posted by Khalid
I FOUND IT!
I FOUND THE SOLUTION.

If there is any one interested in this subject or suffering from it, contact me and I will tell him about the million dollar problem solution.

:p

I have this problem (about access database sending "Resources Exceeded Error") my largest table has 350,000+ Registers. Might this be causing the problem? I tried deleteing 10,000 registers aout of the table but it didn't work.

It just happened after more than 1 year of mu application running perfectly fine.

You can see the error in: http://www.citaris.com/checarplayer.jhtml

Please let me know if you need any other information.

Best regards and thank you very much,.

Alexis.
acastanares@.yahoo.com|||Originally posted by Khalid
I FOUND IT!
I FOUND THE SOLUTION.

If there is any one interested in this subject or suffering from it, contact me and I will tell him about the million dollar problem solution.

:p Khalid, can you help me out? I've been getting this error for a few weeks now. Thanks|||Khalid,
It would be most helpful if you'd post the solution here, rather than make everyone who has this problem email you for it.

VRWL :rolleyes:

Originally posted by Khalid
I FOUND IT!
I FOUND THE SOLUTION.

If there is any one interested in this subject or suffering from it, contact me and I will tell him about the million dollar problem solution.

:p|||I received lately a lot of emails asking about this famous error problem.
this is my solution I have discovered:

ASP is full of bugs, as I discovered lately, but these bugs can be solved by writing code.

My problem was due to Database connections, it seem to me I was doing the perfect thing, opening connections, recordsets, executing queries and finally I destroy every object I create.

THE PROBLEM
===========
If you open only one connection (as I used to do), and run more than one query or recordsets at the same time, what is happening? ASP does not allow you to run more than one query through the same connection at the same time, (though it seems that it is working) so how come? Since ASP does not allow that, it creates its own connections to run the further queries you are executing, and after you are done with them, ASP is not destroying the connections it creates. If you are not destroying your connection objects as well, so you are helping the problem to come up.

WHAT IS HAPPENING
==================
unclosed objects will create a resource leak in memory, and as the times goes, more objects are not closed, and more memory resources are consumed until it reaches to the maximum. And guess what, the famous message will show up! :rolleyes:

SOLUTION
=========
-Define a connection for every query by its own.
-Create you connection object and destroy them your self, don't let ASP do any thing by its self. :D

Hope this information be helpful for every body.

Cheers

;)|||Yes but... Why if i have two servers, one with a single PIII 500 Mhz and 256 Mb Ram and other with Dual PIII 1 ghz an 1 Gb Ram... with the same web page and with the same Operatin System, I got the problem in the Dual PIII and not in the oldest server?|||Hi,
after reading an article, I am using a jdbc:odbc bridge with an excel file setup as a user dsn. This is to import and export from our java applciation and jdbc database to excel. On XP and 2003 server machines, there is no problem. However, on 2000 server machines, they all get 'system resources exceeded' message and fail to do anything.

Can anyone help with identifying the underlying problem and recommend a solution ? Is there a a buggy MS component or something that needs updating? HELP!!!

thanks in advance,
Neil|||iamneil
As I have described previously, you are getting this message because your application is causing memory leak. This happens due to many causes, I have discovered that in my ASP application, IIS is opening more connections when I try to run more than SQL statement at the same time on one connections, so IIS is creating its own connections and it is not closing those connections when done with them.
If the application is working on heavy traffic those unclosed connections will be consuming the resource of the system untill it reaches the maxium.

So try to find out where is your bug that causes a memory leak.

Check out your application and tell me more about it.

Good luck|||Need Help with this issue.

Pretty Sure that the Problem is that there is a Memory Leak within the Page. It randomly just started Popping Up Non-Stop about Temporary Disk Space.

But here's where I need help - I'm a new webmaster at one of AAA Auto Clubs Divisions, and the Previous webmaster loved ASP Scripting. I personally favor PHP, because I have more experience with it.

But The Employees Here need to get this working up and running ASAP -

It's Pretty Obvious that The Script Used is from ASP Calendar -- But I can't just simply Download another Version of ASP Calendar and Overwrite the File because the Files Have Been Modified to Work Better for the Employees Uses.

Here Is the Exact Error Message I Am Receiving

Microsoft OLE DB Provider for ODBC Drivers error '8007000e'
[Microsoft][ODBC Microsoft Access Driver] Not enough space on temporary disk.
/Calendar/calendar.asp, line 222

Here is the Coding For calendar.asp



--
6 hours trying to find what this error code was from, how it was happening, and trying to find the resource to fix it was Extremely Frustrating.

So if you can help in anyway, it will be greatly appreciated. Plus if you throw in some Educational snippits (comments in the code) of What this part of the script does and what this part of the script does. It would help tremondously!|||<!-- #include file ="dsn.asp" -->
<!-- #include file="adovbs.inc" -->
<%
' Name: ASP Calendar
' Author: Manohar Kamath
' Version: 1.0
' Copyright Manohar Kamath. Original calendar copyright Wrox Press
%>
<%
' catch department and status name from login page
Dim Dept, intStat, strEvents
Dept=Request("Dept")
intStat=Request("intStat")
strEvents=""
%>
<%
'------------------
' This function finds the last date of the given month
'------------------
Function GetLastDay(intMonthNum, intYearNum)
Dim dNextStart
If CInt(intMonthNum) = 12 Then
dNextStart = CDate( "1/1/" & intYearNum)
Else
dNextStart = CDate(intMonthNum + 1 & "/1/" & intYearNum)
End If
GetLastDay = Day(dNextStart - 1)
End Function

'----------------------
' This routine prints the individual table divisions for days of the month
'----------------------
Sub Write_TD(sValue, sClass)
Response.Write " <TD ALIGN='RIGHT' WIDTH=14% HEIGHT=80 VALIGN='top' CLASS='" & sClass & "'> " & sValue & "</TD>" & vbCrLf
End Sub

' Constants for the days of the week
Const cSUN = 1, cMON = 2, cTUE = 3, cWED = 4, cTHU = 5, cFRI = 6, cSAT = 7

' Get the name of this file
sScript = Request.ServerVariables("SCRIPT_NAME")

' Check for valid month input
If IsEmpty(Request("MONTH")) OR NOT IsNumeric(Request("MONTH")) Then
datToday = Date()
intThisMonth = Month(datToday)
ElseIf CInt(Request("MONTH")) < 1 OR CInt(Request("MONTH")) > 12 Then
datToday = Date()
intThisMonth = Month(datToday)
Else
intThisMonth = CInt(Request("MONTH"))
End If

' Check for valid year input
If IsEmpty(Request("YEAR")) OR NOT IsNumeric(Request("YEAR")) Then
datToday = Date()
intThisYear = Year(datToday)
Else
intThisYear = CInt(Request("YEAR"))
End If

strMonthName = MonthName(intThisMonth)
datFirstDay = DateSerial(intThisYear, intThisMonth, 1)
intFirstWeekDay = WeekDay(datFirstDay, vbSunday)
intLastDay = GetLastDay(intThisMonth, intThisYear)

' Get the previous month and year
intPrevMonth = intThisMonth - 1
If intPrevMonth = 0 Then
intPrevMonth = 12
intPrevYear = intThisYear - 1
Else
intPrevYear = intThisYear
End If

' Get the next month and year
intNextMonth = intThisMonth + 1
If intNextMonth > 12 Then
intNextMonth = 1
intNextYear = intThisYear + 1
Else
intNextYear = intThisYear
End If

' Get the last day of previous month. Using this, find the sunday of
' last week of last month
LastMonthDate = GetLastDay(intLastMonth, intPrevYear) - intFirstWeekDay + 2
NextMonthDate = 1

' Initialize the print day to 1
intPrintDay = 1

%>

<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Vacation Schedule</title>
<style TYPE="text/css">
TD.NON {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#C0C0C0; font-weight :normal;}
TD.TOP {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#0000FF; font-weight :bold;}
TD.Some {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#000000; font-weight :normal;}

A.NOEVENT:Link {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#000000; font-weight :normal; text-decoration: none;}
A.NOEVENT:Visited {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#000000; font-weight :normal; text-decoration: none;}

A.EVENT:Link {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#000000; font-weight :bold; text-decoration: none;}
A.EVENT:Visited {font-family :Tahoma, Verdana, Arial; font-size :12px; color :#000000; font-weight :bold; text-decoration: none;}

A.NORMAL:Link {font-family :Verdana, Arial; font-size :12px; color :#0000FF; font-weight :normal; text-decoration: none;}
A.NORMAL:Visited {font-family :Verdana, Arial; font-size :12px; color :#0000FF; font-weight :normal; text-decoration: none;}
</style>
</head>

<body LEFTMARGIN="3" BGCOLOR="#FFFFFF" TEXT="#000000">
<p> </p>
<h2 align="center">Vacation Schedule Calendar</h2>
<h3 align="center"><%=Dept %></h3>
<p align=center><a href="http://links.10026.com/?link=default.asp">Choose a different department/branch</a></p>
<FORM ACTION="<% =sScript%>?Dept=<% =Dept %>&intStat=<% =intStat %>" METHOD=GET >
<font face="Verdana, Arial" size="2">

<div align="center">Select month and year:
<SELECT NAME=MONTH>
<OPTION VALUE=1 SELECTED>Jan
<OPTION VALUE=2>Feb
<OPTION VALUE=3>Mar
<OPTION VALUE=4>Apr
<OPTION VALUE=5>May
<OPTION VALUE=6>Jun
<OPTION VALUE=7>Jul
<OPTION VALUE=8>Aug
<OPTION VALUE=9>Sep
<OPTION VALUE=10>Oct
<OPTION VALUE=11>Nov
<OPTION VALUE=12>Dec
</SELECT>
<SELECT NAME=YEAR>
<option value="2006" selected>2006</option>
</SELECT>
<input type="hidden" name="Dept" value=<% =Dept %>>
<input type="hidden" name="intStat" value=<% =intStat %>>
<input type="submit" name="Submit" value="Go!">
<! INPUT TYPE="Image" NAME="" src="http://pics.10026.com/?src=images/go.gif" BORDER="0" WIDTH="35" HEIGHT="20">
</div>
</font>
</FORM>
<table ALIGN="CENTER" BORDER="1" CELLSPACING="0" CELLPADDING="2" BGCOLOR="White" BORDERCOLOR="Gray" width="75%">
<tr><td>
<table BORDER="1" CELLPADDING="1" CELLSPACING="0" BGCOLOR="#FFFFFF" width="100%">
<tr HEIGHT="18" BGCOLOR="Silver">
<td WIDTH="14%" HEIGHT="18" ALIGN="LEFT" VALIGN="MIDDLE">
<div align="center"><a href="http://links.10026.com/?link=<% =sScript%>?month=<% =IntPrevMonth %>&year=<% =IntPrevYear %>&Dept=<% =Dept %>&intStat=<% =intStat %>"><img src="http://pics.10026.com/?src=images/prev.gif" WIDTH="14" HEIGHT="14" BORDER="0" ALT="Previous Month"></a></div>
</td>
<td WIDTH="*" COLSPAN="5" ALIGN="CENTER" VALIGN="MIDDLE" CLASS="SOME"><font size=+1><b>
<% = strMonthName & " " & intThisYear %>
</b> </font></td>
<td WIDTH="14%" HEIGHT="18" ALIGN="RIGHT" VALIGN="MIDDLE">
<div align="center"><a href="http://links.10026.com/?link=<% =sScript %>?month=<% =IntNextMonth %>&year=<% =IntNextYear %>&Dept=<% =Dept %>&intStat=<% =intStat %>"><img src="http://pics.10026.com/?src=images/next.gif" WIDTH="14" HEIGHT="14" BORDER="0" ALT="Next Month"></a></div>
</td>
</tr>
<tr>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Sunday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Monday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Tuesday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Wednesday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Thursday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Friday</td>
<td ALIGN="center" CLASS="SOME" WIDTH="14%" HEIGHT="15" VALIGN="BOTTOM">Saturday</td>
</tr>

<%

' Initialize the end of rows flag to false
EndRows = False
Response.Write vbCrLf

' Loop until all the rows are exhausted
Do While EndRows = False

' Start a table row
Response.Write " <TR>" & vbCrLf
' This is the loop for the days in the week
For intLoopDay = cSUN To cSAT
' If the first day is not sunday then print the last days of previous month in grayed font
If intFirstWeekDay > cSUN Then
Write_TD LastMonthDate, "NON"
LastMonthDate = LastMonthDate + 1
intFirstWeekDay = intFirstWeekDay - 1
' The month starts on a sunday
Else
' If the dates for the month are exhausted, start printing next month's dates
' in grayed font
If intPrintDay > intLastDay Then
Write_TD NextMonthDate, "NON"
NextMonthDate = NextMonthDate + 1
EndRows = True
Else
' If last day of the month, flag the end of the row
If intPrintDay = intLastDay Then
EndRows = True
End If

dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)

' Open a record set of schedules
Set Rs = Server.CreateObject("ADODB.RecordSet")

sSQL = "SELECT * FROM tEvents WHERE " & _
"Start_Date =#" & dToday & "# " & _
"AND (Dept='" & Dept & _
"' OR Dept='all')" & _
" ORDER BY Start_Date"

' Open the RecordSet with a static cursor. This cursor provides bi-directional navigation
Rs.Open sSQL, sDSN, adOpenStatic, adLockReadOnly, adCmdText

If NOT Rs.EOF Then

bEvents = True
Do While NOT Rs.EOF

' build list of events for day
'If logged in as manager or during initial entry period, include delete option, else display only names
If intStat = 2 AND Rs("Dept") <> "all" Then
strEvents = strEvents & Rs("Event_Title") & "<a href='delete.asp?Event_ID=" & Rs("Event_ID") & "&Dept=" & Dept & "&intStat=" & intStat & "'><font size=-2 color=red>DEL</font></a><br>"
Else
strEvents = strEvents & Rs("Event_Title") & "<br>"
End If

Rs.MoveNext

Loop

Else

bEvents = False

End If

Rs.Close
Set Rs = Nothing

' If the event flag is not raise for that day, print it in a plain font
If bEvents = False Then
Write_TD intPrintDay, "SOME"
Else
Write_TD intPrintDay & "<br>" & strEvents, "SOME"
strEvents = ""

End If

End If


' Increment the date. Done once in the loop.

intPrintDay = intPrintDay + 1
'clear list of events
strEvents = ""
End If

' Move to the next day in the week

Next
Response.Write " </TR>" & vbCrLf

Loop

%>
</table>
</td></tr>
</table>|||I FOUND IT!
I FOUND THE SOLUTION.

If there is any one interested in this subject or suffering from it, contact me and I will tell him about the million dollar problem solution.

:p

I experiencing the same problem I can not find the solution. Please let me know how to solve

Microsoft OLE DB Provider for ODBC Drivers error 80040e14

Hi guys, it's nice to join the forum. Can someone can help me?

After 2 years of using a program, i suddenly got this error. I tried
re-installing SQL but im still getting the message.

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot load the DLL
xplog70.dll, or one of the DLLs it references. Reason: 193(error not
found).Albert (albert@.extremerack.com) writes:
> Hi guys, it's nice to join the forum. Can someone can help me?
> After 2 years of using a program, i suddenly got this error. I tried
> re-installing SQL but im still getting the message.
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot load the DLL
> xplog70.dll, or one of the DLLs it references. Reason: 193(error not
> found).

That's an error on the SQL Server side, occurring when calling some
extended stored procedure, which is implmented by the xplog70.dll. I
don't know what exactly is in this DLL, but it appears that xp_logevent
is there.

If there is no requirement for high availability, the easiest may be
to restart SQL Server or even reboot the SQL Server machine to see if that
helps.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Microsoft OLE DB Provider for ODBC Drivers error 80040e07

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Our SQL - INSERT INTO tbl_WAAGUsage (logindate,logintime,countryname,subscriberid,ipad dress) VALUES ('2/16/2004','9:50:01 AM','Albania',62,'123456789')

Hi,

I was wondering if somebody could help me... the following error message appears when I run an asp page... I did a google search and nobody appears to have had a solution to the particular problem I have... it's completely baffling but I'm hoping it's a simple setting.

Firstly, I'm sure the coding the correct as the asp page runs on two different servers correctly. I recently got a new server and the script does not appear to work with the Date function in asp on this new server. I outputted the SQL to the browser and then ran it through the Query Analyser(QA) and guess what, it worked! But when I run the asp page the above error crops up... now when I run the SQL through QA and alter the date value in the format 'dd/mm/yyyy' the above error appears in QA.. if I've lost you at this point let me know...

The way ASP passes the Date value to my SQL DB appears to be confused and it's really confusing me as it works perfectly on two servers and not the new one... the new server runs newer versions of O/S and SQL so I'm not sure that is the case... I've changed the date settings on the server so they all three servers match each other... so I have no where else to turn... any help and pointers would be much appreciated!

Regards

Steveuse convert(datetime,variable,formattype) for your variables to first convert them into datetime format and then insert.|||ok... i'll try and see what the results are...

thanks!

Originally posted by Enigma
use convert(datetime,variable,formattype) for your variables to first convert them into datetime format and then insert.|||I don't think there is a Conver() function in VBScript, however there is a FormatDateTime function which I used... didn't produce the results I wanted unfortunately, still comes up with an error... it's the case of the same code producing different results on different servers and my guess is there could be a setting to change on the servers... I'm trying to match up the settings and so far no luck...

could you enlighten me?|||Convert is a function in SQL server , not in VB ... use this function in your insert query.|||Two webservers make this page work, and the third one has problems? Have you checked (or had an admin check) the regional settings on the bad box?|||ah hah...

I'm very enlightened!! Thanks alot for that... solves all my date problems now!!

Cheers

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
Hi all,
I am getting this error while trying to insert a record into the database ta
ble. We are using SQL SERVER 2000/ODBC/ASP combination.
I would really appreciate if somebody could help me regarding this.
thank you.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...Could be different things. The first thing to check for
would probably be locking, blocking issues on SQL Server.
You can use sp_who2 to identify blocking. You can use
sp_lock to see what types of locks are occurring, you can
also query sysprocesses in master. You'd probably want to
start with these and go from there.
-Sue
On Tue, 18 Oct 2005 11:12:24 -0700, latha
(rc_forum@.hotmail.com) wrote:

>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>[Microsoft][ODBC SQL Server Driver]Timeout expired
>Hi all,
>I am getting this error while trying to insert a record into the database t
able. We are using SQL SERVER 2000/ODBC/ASP combination.
>I would really appreciate if somebody could help me regarding this.
>thank you.
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...sql

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Timeout expired
Hi all,
I am getting this error while trying to insert a record into the database table. We are using SQL SERVER 2000/ODBC/ASP combination.
I would really appreciate if somebody could help me regarding this.
thank you.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Could be different things. The first thing to check for
would probably be locking, blocking issues on SQL Server.
You can use sp_who2 to identify blocking. You can use
sp_lock to see what types of locks are occurring, you can
also query sysprocesses in master. You'd probably want to
start with these and go from there.
-Sue
On Tue, 18 Oct 2005 11:12:24 -0700, latha
(rc_forum@.hotmail.com) wrote:

>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>[Microsoft][ODBC SQL Server Driver]Timeout expired
>Hi all,
>I am getting this error while trying to insert a record into the database table. We are using SQL SERVER 2000/ODBC/ASP combination.
>I would really appreciate if somebody could help me regarding this.
>thank you.
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Location: p:\sql\ntdbms\storeng\drs\include\record.inl:1447 Expression: m_SizeRec > 0 && m_SizeRec <= MAXDATAROW SPID: 68 Process ID: 952

Getting the above error when accessing a particular viewI think the some there is some bugs inside the view. if you post the view. i will try

Microsoft OLE DB Provider for ODBC Drivers error 80004005

Hi everybody
My problem with sql server is the following one:
I've got my backoffice manager application done with asp technology
that works on sql server installed on Win2000 and running on IIS5.
what I've done is simply doing a backup of my db and moving the asp
application on another server: Windows 2003 with IIS6 and sql server
vers.8.
Then I tried to set up everything as in the beginning on the previous
machine(Win2K), but I'm getting this error:

Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]Server SQL inesistente o accesso
negato.
(translated would be "SQL Server doesn't exist or access denied")
/sitowebsite/bom/login.asp, line 13

...where in the line 13 is set the connection to the database:
Conn.Open Application("DBsource")

which should be driven by what is set inside the global.asa file:
Application("DBsource")="Provider=SQLOLEDB;server=127.0.0.1;database=db_nam e;uid=db_uid;pwd=db_pwd;"
Application("WS_DB_TYPE") = ( "SQLSERVER" )

I tried to restore the database just not losing information and nothing
happens.
I tried also to create a new user and modify the properties as it
should be from the previous settings in the db(db_owner,...etc), still
nothing.

any clue is appriciated.
many thanks in advance.ziottt (t.giommi@.gmail.com) writes:

Quote:

Originally Posted by

My problem with sql server is the following one:
I've got my backoffice manager application done with asp technology
that works on sql server installed on Win2000 and running on IIS5.
what I've done is simply doing a backup of my db and moving the asp
application on another server: Windows 2003 with IIS6 and sql server
vers.8.
Then I tried to set up everything as in the beginning on the previous
machine(Win2K), but I'm getting this error:
>
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]Server SQL inesistente o accesso
negato.
(translated would be "SQL Server doesn't exist or access denied")
/sitowebsite/bom/login.asp, line 13


This error message that the application cannot reach the SQL Server
you are trying to connect to. Thus, users or backups have no importance,
because you don't reach that far.

Quote:

Originally Posted by

...where in the line 13 is set the connection to the database:
Conn.Open Application("DBsource")
>
which should be driven by what is set inside the global.asa file:
>
>Application("DBsource")="Provider=SQLOLEDB;server=127.0.0.1;database=db_nam
>e;uid=db_uid;pwd=db_pwd;"


And SQL Server is running on the same server as the web server? Have you
verified that SQL Server is actually running?

Diclaimer: I don't know ASP, so if there are any problems with that
global.asa, I can't tell.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoy
On several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>

Microsoft OLE DB Provider for ODBC Drivers

I am using an system ODBC created to access data on an AS/400.
I can access the data fine, using the following query.
SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
the second CRPDTA is the SCHEMA, and F0101 is the file name.
When I try to save this query as a view, I receive the following error.
The operation could not be performed because the OLE DB provider
'MSDASQL' was unable to begin a distributed transaction.
[OLE/DB provider returned message: [IBM][Client Access Express O
DBC
Driver (32-bit)]Option type out of range.]
OLE DB error trace [OLE/DB Provider 'MSDASQL'
ITransactionJoin::JoinTransaction returned 0x8004d00a]
Can anyone help?
PMGBoyOn several occasion a bug in the ODBC driver causes all sorts of problem
in the client. Try using any third party software, such as WinSQL
(http://synametrics.com/winsql) and see if you get the same behavior.
This would eliminate the possibility of a buggy driver.
jeff.jones@.papermagic.com wrote:
> I am using an system ODBC created to access data on an AS/400.
> I can access the data fine, using the following query.
> SELECT F0101.* FROM CRPDTA.PILGRIM.CRPDTA.F0101 as F0101
> where the first CRPDTA is the DSN name, PILGRIM is the AS/400 catalog,
> the second CRPDTA is the SCHEMA, and F0101 is the file name.
> When I try to save this query as a view, I receive the following error.
> The operation could not be performed because the OLE DB provider
> 'MSDASQL' was unable to begin a distributed transaction.
> [OLE/DB provider returned message: [IBM][Client Access Express
ODBC
> Driver (32-bit)]Option type out of range.]
> OLE DB error trace [OLE/DB Provider 'MSDASQL'
> ITransactionJoin::JoinTransaction returned 0x8004d00a]
> Can anyone help?
> PMGBoy
>sql

Microsoft OLE DB Provider for DB2 in SSIS vs. ODBC in DTS

I finally made data transfer between AS400 and SQL2005 work by using Microsoft OLE DB provider for DB2. I have tried other methods, some do not have build-in destination, some have unicode conversion problem. The only issue I have with this method is the peformance. For example, 300,000 rows load from AS400 take only 3 minutes with the ODBC connection in DTS, but more than 5 minutes with the microsoft OLD DB provider for DB2 in SSIS.

Does anyone have the same issue or figured out any tweaking that may speed up the transfer?

Thanks.

In the 5 minute example, what was your destination?|||The destination is the same - an OLE DB connection that connect to a SQL 2005 server.|||

Jane2006 wrote:

The destination is the same - an OLE DB connection that connect to a SQL 2005 server.

And are you using the "fast load" option?|||

Since I also need to load data back from SQL2005 to AS400, I could not use ADO.NET/ODBC method unless as someone else suggested, build a component for that missing destination microsoft does not have time to build. Also, the unicode issue drives me crazy. So I decide to use Microsoft OLE DB Provider for DB2.

Based on my experience, only the version released in April 2007 is good on 64-bit machine. The old versions did not work on our 64-bit machine even thought it said it should.

|||

Are you talking about the Data access mode in OLE DB Destination Editor? Yes. I am using the fast load. Actually this is a default unless changed.

|||

Jane2006 wrote:

Since I also need to load data back from SQL2005 to AS400, I could not use ADO.NET/ODBC method unless as someone else suggested, build a component for that missing destination microsoft does not have time to build. Also, the unicode issue drives me crazy. So I decide to use Microsoft OLE DB Provider for DB2.

Based on my experience, only the version released in April 2007 is good on 64-bit machine. The old versions did not work on our 64-bit machine even thought it said it should.

This is irrelevant. On the OLE DB destination, are you using the "Table or view - fast load" option when loading your results from AS400 to SQL Server?|||Yes. I think there must be some settings in Microsoft Provider OLE DB Provider for DB2 that needs to be tuned up. I just don't know where.|||How many rows are you retrieving and what is your MaxInsertCommitSize set to?|||Retrieving 3048740 rows from AS400. Maximum insert commit size is 0.|||Try setting MaxInsertCommitSize to 20000 and see what happens.|||Just give it a try. Not much difference. Still more than 5 minutes.|||Any transformations? Or just source -> destination?

Are you specifying a query in the source connection, or selecting a table from the drop down list?|||The one fundamental difference here is that you are using a Microsoft DB2 driver. It isn't a native AS400 driver. It's a 3rd party driver as far as connecting to the mainframe is concerned. You can download the IBM DB2 driver and you might have luck with that.

This isn't the same as using ODBC, which would (perhaps) use a native driver to connect.|||

No transformation. A straight source to destination. I am using SQL commnd for this particular one.

I have used tables in other scenarions as well. The row sizes are much smaller than this one, but ODBC consistently has better performance, even though only several seconds better.

Microsoft ODBC Sql server driver Communication Link Failure

I get the message Microsoft [ODBC Sql server driver]communication link failure error message in my VB 6 application with MSDE engine. This error does not happen often.
My connection string is as below.

"Provider=MSDASQL;Driver={SQL Server};Server=" & mSvrName & ";DATABASE=cnsClient;uid=uid;pwd=pwd"

Please help.Were you able to figure out a solution? It seems like a ODBC specific error more than a MSSQL one. I get the same error when trying execute queries against a DB2 database.

Microsoft ODBC sql driver cannot generate sspi context

Hi,
I am facing a connection error occasionally. Im using MSDE2000a and
Dbamgr2k. The connection seems to have the following error
occasionally. Can anyone of u help me to troubleshoot this problem?
thank you.
Connection Failed
SQLState: 'HY000'
SQL Server Error: 1364
[Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context
Regards,
JustinJustin wrote:
> Hi,
> I am facing a connection error occasionally. Im using MSDE2000a and
> Dbamgr2k. The connection seems to have the following error
> occasionally. Can anyone of u help me to troubleshoot this problem?
> thank you.
> Connection Failed
> SQLState: 'HY000'
> SQL Server Error: 1364
> [Microsoft][ODBC SQL Server Driver]Cannot generate SSPI context
> Regards,
> Justin
>
Are you connecting with a Windows account in a domain? If so, the machine r
unning SQL Server may have lost connection
to the domain controller and can't authenticate your account credentials. S
earch MS support.|||Thanx Ed Enstrom for your reply. I don't really get what you meant.
Maybe i should elaborate more on this. The pc is a standalone pc, OS is
xp pro, database using msde2000a. The error comes out from no where.
There are times which im able to connect to the sql server but
sometimes it shows the error of microsoft odbc sql server cannot
generate sspi context. Should i connect using the "sa" or by "trusted
NT connection" in dbamgr2k'
p/s: sorry, im a newbie here. thanx for your patience.
regards,
justin|||What Ed means by "Search MS support" is to search the MSDN and/or TechNet,
including the KB. I searched an old version of the MSDN for "Cannot generate
SSPI context" and got one result that says that the "native error will
contain the Win32 error code".
"Justin" <justin@.smsit.com.my> wrote in message
news:1135235596.227999.154030@.z14g2000cwz.googlegroups.com...
> Thanx Ed Enstrom for your reply. I don't really get what you meant.

Wednesday, March 21, 2012

Microsoft Drivers for Accessing data from Unix.

Are there any microsoft provided ODBC drivers that can be installed on Unix
side for accessing SQL Server data? OR they are only available from third
party.
Regards,
MZeeshan
MS does not provide an ODBC driver that works on Unix. However, you can
get that from Data Direct. Microsoft does make a JDBC driver though.
MZeeshan wrote:
> Are there any microsoft provided ODBC drivers that can be installed on Unix
> side for accessing SQL Server data? OR they are only available from third
> party.
>
|||Hi MZeeshan,
Thanks for your post.
Unfortunately, I am sorry to say that we do not support ODBC drivers for
UNIX officially. However, I have noticed here is a very good article from
MVP Erland Sommarskog for your reference
Connecting to MS SQL Server from Unix
http://www.sommarskog.se/mssql/unix.html
Hope it helps.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/tec...rview/40010469
Others: https://partner.microsoft.com/US/tec...pportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

Microsoft Drivers for Accessing data from Unix.

Are there any microsoft provided ODBC drivers that can be installed on Unix
side for accessing SQL Server data? OR they are only available from third
party.
Regards,
MZeeshanMS does not provide an ODBC driver that works on Unix. However, you can
get that from Data Direct. Microsoft does make a JDBC driver though.
MZeeshan wrote:
> Are there any microsoft provided ODBC drivers that can be installed on Uni
x
> side for accessing SQL Server data? OR they are only available from third
> party.
>|||Hi MZeeshan,
Thanks for your post.
Unfortunately, I am sorry to say that we do not support ODBC drivers for
UNIX officially. However, I have noticed here is a very good article from
MVP Erland Sommarskog for your reference
Connecting to MS SQL Server from Unix
http://www.sommarskog.se/mssql/unix.html
Hope it helps.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 19, 2012

Microsoft Access 2000 missing ODBC Links

I have a Microsoft Access 2000 with several ODBC linked tables.
The back end DB is SQL Server 2000.
At the beginning everything was running OK.
Apparently randomly, Access returns the following error:
"ODBC -- connection to SQL Server failed" when I try to open a linked table that previously work.
I must delete the linked table and create the link again to let the system work again.
Please Help !
Thanks
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
That happens whenever you make a schema change to the table in SQL
Server. One way to avoid these errors is to write VBA code that runs
on startup. It deletes any old links and re-creates them when the
Access app opens, guaranteeing that the links are always valid.
--Mary
On Fri, 22 Oct 2004 02:40:27 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>I have a Microsoft Access 2000 with several ODBC linked tables.
>The back end DB is SQL Server 2000.
>At the beginning everything was running OK.
>Apparently randomly, Access returns the following error:
>"ODBC -- connection to SQL Server failed" when I try to open a linked table that previously work.
>I must delete the linked table and create the link again to let the system work again.
>Please Help !
>Thanks
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Thanks for the help, but the base SQL Server tables are always the same !
No schema update have been made to them.
PS: Sorry for my POOR english...
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||It might be a network error if you're not making any schema changes.
I'd still recommend creating a procedure to deletelink/relink tables.
This will save you from having to do it manually every time there's an
error and the connection gets dropped.
--Mary
On Fri, 22 Oct 2004 08:33:12 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for the help, but the base SQL Server tables are always the same !
>No schema update have been made to them.
>PS: Sorry for my POOR english...
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Thanks for answering me !
I'll keep on trying.
Table relinking solution is OK but it's too slow...
Thanks anyway.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||It shouldn't be slow at all if you have a valid SQL Server connection
over a LAN. It should only take a couple of seconds for the code to
execute.
--Mary
On Mon, 25 Oct 2004 01:38:45 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for answering me !
>I'll keep on trying.
>Table relinking solution is OK but it's too slow...
>Thanks anyway.
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||Relinking one or two tables is OK, but I have 110 tables linked :-O !
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||I'm not talking about doing it manually, I'm talking about running VBA
code that uses DAO to delete and recreate tabledef objects. This
should run very quickly since all it's doing is creating tabledef
objects in the local .mdb and setting their connection properties. You
don't access the actual tables on the server until you open them. The
only way this code takes longer than a few seconds is if you're
linking thousands of tables, which no one in their right mind is going
to do anyway.
--Mary
On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Relinking one or two tables is OK, but I have 110 tables linked :-O !
>
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
|||You shouldn't need to delete and recreate the TableDef objects Umberto. Just
call the RefreshLink method. Mary is correct it should go very fast -
seconds not minutes. Use this code:
For Each tdf In CurrentDb.TableDefs
If InStr(1, tdf.Connect, "ODBC") > 0 Then
tdf.RefreshLink
End If
Next
"Mary Chipman" <mchip@.online.microsoft.com> wrote in message
news:ivlsn0p3bhju561t3i46vu8g01j2a73d37@.4ax.com... [vbcol=seagreen]
> I'm not talking about doing it manually, I'm talking about running VBA
> code that uses DAO to delete and recreate tabledef objects. This
> should run very quickly since all it's doing is creating tabledef
> objects in the local .mdb and setting their connection properties. You
> don't access the actual tables on the server until you open them. The
> only way this code takes longer than a few seconds is if you're
> linking thousands of tables, which no one in their right mind is going
> to do anyway.
> --Mary
> On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
> wrote:
ASP.NET resources...
>
|||I have been having the same trouble lately, but I think I just fixed it.
When linking the table there is a check box to save password (I swear I
have never seen it before). I reestablished one table from each
database I am linked to and it seems to work. Previously every time I
closed and reopened Access I had to relink the tables.
Ed21
Posted via http://www.webservertalk.com
View this thread: http://www.webservertalk.com/message443464.html

Microsoft Access 2000 missing ODBC Links

I have a Microsoft Access 2000 with several ODBC linked tables.
The back end DB is SQL Server 2000.
At the beginning everything was running OK.
Apparently randomly, Access returns the following error:
"ODBC -- connection to SQL Server failed" when I try to open a linked table
that previously work.
I must delete the linked table and create the link again to let the system w
ork again.
Please Help !
Thanks
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...That happens whenever you make a schema change to the table in SQL
Server. One way to avoid these errors is to write VBA code that runs
on startup. It deletes any old links and re-creates them when the
Access app opens, guaranteeing that the links are always valid.
--Mary
On Fri, 22 Oct 2004 02:40:27 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>I have a Microsoft Access 2000 with several ODBC linked tables.
>The back end DB is SQL Server 2000.
>At the beginning everything was running OK.
>Apparently randomly, Access returns the following error:
>"ODBC -- connection to SQL Server failed" when I try to open a linked table
that previously work.
>I must delete the linked table and create the link again to let the system
work again.
>Please Help !
>Thanks
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Thanks for the help, but the base SQL Server tables are always the same !
No schema update have been made to them.
PS: Sorry for my POOR english...
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||It might be a network error if you're not making any schema changes.
I'd still recommend creating a procedure to deletelink/relink tables.
This will save you from having to do it manually every time there's an
error and the connection gets dropped.
--Mary
On Fri, 22 Oct 2004 08:33:12 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for the help, but the base SQL Server tables are always the same !
>No schema update have been made to them.
>PS: Sorry for my POOR english...
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Thanks for answering me !
I'll keep on trying.
Table relinking solution is OK but it's too slow...
Thanks anyway.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||It shouldn't be slow at all if you have a valid SQL Server connection
over a LAN. It should only take a couple of seconds for the code to
execute.
--Mary
On Mon, 25 Oct 2004 01:38:45 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Thanks for answering me !
>I'll keep on trying.
>Table relinking solution is OK but it's too slow...
>Thanks anyway.
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||Relinking one or two tables is OK, but I have 110 tables linked :-O !
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...|||I'm not talking about doing it manually, I'm talking about running VBA
code that uses DAO to delete and recreate tabledef objects. This
should run very quickly since all it's doing is creating tabledef
objects in the local .mdb and setting their connection properties. You
don't access the actual tables on the server until you open them. The
only way this code takes longer than a few seconds is if you're
linking thousands of tables, which no one in their right mind is going
to do anyway.
--Mary
On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
wrote:

>Relinking one or two tables is OK, but I have 110 tables linked :-O !
>
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...|||You shouldn't need to delete and recreate the TableDef objects Umberto. Just
call the RefreshLink method. Mary is correct it should go very fast -
seconds not minutes. Use this code:
For Each tdf In CurrentDb.TableDefs
If InStr(1, tdf.Connect, "ODBC") > 0 Then
tdf.RefreshLink
End If
Next
"Mary Chipman" <mchip@.online.microsoft.com> wrote in message
news:ivlsn0p3bhju561t3i46vu8g01j2a73d37@.
4ax.com...
> I'm not talking about doing it manually, I'm talking about running VBA
> code that uses DAO to delete and recreate tabledef objects. This
> should run very quickly since all it's doing is creating tabledef
> objects in the local .mdb and setting their connection properties. You
> don't access the actual tables on the server until you open them. The
> only way this code takes longer than a few seconds is if you're
> linking thousands of tables, which no one in their right mind is going
> to do anyway.
> --Mary
> On Tue, 26 Oct 2004 06:41:18 -0700, Umberto Tullo (tullo@.tin.it)
> wrote:
>
ASP.NET resources...[vbcol=seagreen]
>|||I have been having the same trouble lately, but I think I just fixed it. Whe
n linking the table there is a check box to save password (I swear I have ne
ver seen it before). I reestablished one table from each database I am linke
d to and it seems to work. Previously every time I closed and reopened Acces
s I had to relink the tables.

Monday, March 12, 2012

MFC/SQL Server 8 + ODBC problems

Hi. I get the feeling ive probably not understood something fundamental but im having issues with using CRecordSet / ODBC from MFC to access data in an SQL server 8 database.

I open the database without any problems using a DSN for SQL native client. THis opens fine and is updateable. I then get a record set out using the dynaset flag. This is where the problem occurs. If i use dynaset then the record is not updateable. If I use the cursorlib for the database, then it doesnt support dynaset anyway.

Now, the question is - should i be using dynaset anyway? I am trying to develop a multi-user database application. THe problem im looking at is I have a customer records screen. If 2 users both look at the record, they both try to update the record, how do you stop this happening. What is the best way to lock the record as soon as one starts to edit it.

I thought about using a locked field to say which user is locking the record, but then you run into the problem of the system crashing and leaving a record locked perminantly.

Ive looked time and time again in books and online but cant find a good answer to this problem? dynaset seemed to be better for this than snapshot as you can get details on updates by other users.

Any information would be great.

Thanks

Adrian

Check the CanUpdate property of CRecordset. Most likely it will return FALSE. Then bring up your query, and we’ll see if we can make it updateable.

Zlatko

|||

Yes - i use the CanUpdate to decide that the recordset is indeed not updateable. The query is simply a get all from a table so the sql in hte GetDefaultSQL() is return _T("[tblClients]");. It does seem there is a problem with using dynaset records. Ive now rewritten the application to use snapshot instead.

Adrian

|||

Adrian,

Let’s figure out first why your dynaset is not updatable. I need you to clarify a few things:

1. Does table tblClients have a primary key?

2. If you have single client that opens a dynaset from that table, is that dynaset updatable or not?

3. Do you pass any options to CRecordset.Open()?

4. Do you override DoFieldExchange() or DoBulkFieldExchange()?

If you can send me the code that opens the connection, the recordset, and that tries to update, that would be helpful.

Thanks,

Zlatko

|||

Adrian Brown wrote:

Hi. I get the feeling ive probably not understood something fundamental but im having issues with using CRecordSet / ODBC from MFC to access data in an SQL server 8 database.

I open the database without any problems using a DSN for SQL native client. THis opens fine and is updateable. I then get a record set out using the dynaset flag. This is where the problem occurs. If i use dynaset then the record is not updateable. If I use the cursorlib for the database, then it doesnt support dynaset anyway.

Now, the question is - should i be using dynaset anyway? I am trying to develop a multi-user database application. THe problem im looking at is I have a customer records screen. If 2 users both look at the record, they both try to update the record, how do you stop this happening. What is the best way to lock the record as soon as one starts to edit it.

I thought about using a locked field to say which user is locking the record, but then you run into the problem of the system crashing and leaving a record locked perminantly.

Ive looked time and time again in books and online but cant find a good answer to this problem? dynaset seemed to be better for this than snapshot as you can get details on updates by other users.

Any information would be great.

Thanks

Adrian

Hello man!

In first snapshot is the best way to use for Your application.

In second Your tabels it's must to have a cod_id for protection the records in this situation.

I use snapshot with CDatabase and CRecordset and I do not have any problem for this time.

Please escuse my English and have a nice day:

CDatabase dbDateServ;

CRs_Tab1* rsTab_1; // in my case CRs_Tab1 is a class derivved from CRecordset class mapp to table Tab1 from Sql Server

//2000

TRY

{

dbDateServ.Open("ODBC; DSN=SQL_Server; UID=sa; PWD=florin; DATABASE=DateServ");

}

CATCH(CDBException, e)

{

e->ReportError();

}

END_CATCH

rsTab1 = new CRs_Tab1(&dbDateServ);

TRY

{

rsTab1->Open(CRecordset::snapshot, "SELECT * FROM Tab1");

}

CATCH(CDBException, e)

{

e->ReportError();

}

END_CATCH

rsTab1->Close();

delete rsTab1;

dbDateServ.Close();

MFC/SQL Server 8 + ODBC problems

Hi. I get the feeling ive probably not understood something fundamental but im having issues with using CRecordSet / ODBC from MFC to access data in an SQL server 8 database.

I open the database without any problems using a DSN for SQL native client. THis opens fine and is updateable. I then get a record set out using the dynaset flag. This is where the problem occurs. If i use dynaset then the record is not updateable. If I use the cursorlib for the database, then it doesnt support dynaset anyway.

Now, the question is - should i be using dynaset anyway? I am trying to develop a multi-user database application. THe problem im looking at is I have a customer records screen. If 2 users both look at the record, they both try to update the record, how do you stop this happening. What is the best way to lock the record as soon as one starts to edit it.

I thought about using a locked field to say which user is locking the record, but then you run into the problem of the system crashing and leaving a record locked perminantly.

Ive looked time and time again in books and online but cant find a good answer to this problem? dynaset seemed to be better for this than snapshot as you can get details on updates by other users.

Any information would be great.

Thanks

Adrian

Check the CanUpdate property of CRecordset. Most likely it will return FALSE. Then bring up your query, and we’ll see if we can make it updateable.

Zlatko

|||

Yes - i use the CanUpdate to decide that the recordset is indeed not updateable. The query is simply a get all from a table so the sql in hte GetDefaultSQL() is return _T("[tblClients]");. It does seem there is a problem with using dynaset records. Ive now rewritten the application to use snapshot instead.

Adrian

|||

Adrian,

Let’s figure out first why your dynaset is not updatable. I need you to clarify a few things:

1. Does table tblClients have a primary key?

2. If you have single client that opens a dynaset from that table, is that dynaset updatable or not?

3. Do you pass any options to CRecordset.Open()?

4. Do you override DoFieldExchange() or DoBulkFieldExchange()?

If you can send me the code that opens the connection, the recordset, and that tries to update, that would be helpful.

Thanks,

Zlatko

|||

Adrian Brown wrote:

Hi. I get the feeling ive probably not understood something fundamental but im having issues with using CRecordSet / ODBC from MFC to access data in an SQL server 8 database.

I open the database without any problems using a DSN for SQL native client. THis opens fine and is updateable. I then get a record set out using the dynaset flag. This is where the problem occurs. If i use dynaset then the record is not updateable. If I use the cursorlib for the database, then it doesnt support dynaset anyway.

Now, the question is - should i be using dynaset anyway? I am trying to develop a multi-user database application. THe problem im looking at is I have a customer records screen. If 2 users both look at the record, they both try to update the record, how do you stop this happening. What is the best way to lock the record as soon as one starts to edit it.

I thought about using a locked field to say which user is locking the record, but then you run into the problem of the system crashing and leaving a record locked perminantly.

Ive looked time and time again in books and online but cant find a good answer to this problem? dynaset seemed to be better for this than snapshot as you can get details on updates by other users.

Any information would be great.

Thanks

Adrian

Hello man!

In first snapshot is the best way to use for Your application.

In second Your tabels it's must to have a cod_id for protection the records in this situation.

I use snapshot with CDatabase and CRecordset and I do not have any problem for this time.

Please escuse my English and have a nice day:

CDatabase dbDateServ;

CRs_Tab1* rsTab_1; // in my case CRs_Tab1 is a class derivved from CRecordset class mapp to table Tab1 from Sql Server

//2000

TRY

{

dbDateServ.Open("ODBC; DSN=SQL_Server; UID=sa; PWD=florin; DATABASE=DateServ");

}

CATCH(CDBException, e)

{

e->ReportError();

}

END_CATCH

rsTab1 = new CRs_Tab1(&dbDateServ);

TRY

{

rsTab1->Open(CRecordset::snapshot, "SELECT * FROM Tab1");

}

CATCH(CDBException, e)

{

e->ReportError();

}

END_CATCH

rsTab1->Close();

delete rsTab1;

dbDateServ.Close();

MFC CDatabase and ODBC version

Hi all,

I created a CDatabase object, called OpenEx and checked the ODBC version with:

unsigned int version;

SQLGetEnvAttr(AfxGetHENV(),SQL_ATTR_ODBC_VERSION,&version,0,0);

and the version is 2. I want to make it 3 and I tried:

SQLSetEnvAttr(AfxGetHENV(),SQL_ATTR_ODBC_VERSION,(void*)SQL_OV_ODBC3,0);

It fails and I suppose it is because OpenEx already have an HDBC created. Does that mean I cannot use CDatabase and I have to write my own ODBC wrapper class? Thanks.

Kevin

You might be able to derive your own class from CDatabase and override AllocConnect adding the call to SQLSetEnvAttr.