|
Friends, we are getting strange errors whenever our applications access database from SQL server. The errors we are getting are:
1)
Microsoft OLE DB Provider for SQL Server error '80004005' <br />
<br />
[DBMSSOCN]General network error. Check your network documentation.
2)
[MICROSOFT][ODBC][SQL SERVER DRIVER] [TCP/IP SOCKETS]ConnectionRead(recv()).
Can anyone help me getting rid of these errors. Our applications that access database are developed in VB and ASP.
|
|
|
|
|
Sounds like you are having (generic) network problems. Possibly a flaky network card or switch somewhere.
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
I'm writing program that I use Access database and C#.And I use it in disconnected(DataSet) mode.When I run this code my dataset will be have 0 rows,and it seems it return nothing but if I only I change my connection string to SQL connection and use SQLServer instead of Access,I'll get correct result.This is my code:
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database
Password='';User ID=Admin ; Persist Security Info =False;Data Source=F:\\Visual
Studio Projects1\\Visual C#\\Reminder Manager\\bin\\Debug\\RemindManagerDB.mdb");
oleDbConnection1.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("select * from my table", conn);
DataSet firstjobds = new DataSet();
adapter.Fill(firstjobds);
oleDbConnection1.Close();
foreach (DataRow r in firstjobds.Tables[0].Rows)
{
userjobslv.Items.Add(r["JobTitle"].ToString());
}
Any idea?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Don't know if it was just the formatting in your code sample, but:
1.
Jet OLEDB:database Password=''
seems to have some garbage whitespace...
This probably should be just
password =;
anyway, rather than the jet specific one.
2.
"select * from my table"
has white space in the table name...
use:
"select * from [my table]"
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
Thanks Rob,But problem in connection string caused unhandled error,but I don't recieve any error,and also about name of table.Those are problems when I copy paste codes here.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
|
I have an application which stores data in a text field (sql server 2000) like the following:
1040970851Demotest me five1040970856Demothis is another thing1040970955Demothis is the n. no quotes now. that was scary.
I need to parse the data for crystal reports 8.0 so that it displays as it does in the application...
I don't have a problem parsing the data, but I do have a problem in figuring out how to implement a solution. It turns out that using Crystal 8.0 UFL dlls are limited to 255 characters or less.
Can I get the data to crystal properly using external stored procedures, or am I going to be relegated to writing an odbc driver?
|
|
|
|
|
Do we have something like GetDate() in Access?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Mazdak wrote:
Do we have something like GetDate() in Access?
Oh, in VB you need to use Now() . You can also format it such as:
d = Format(Now, "mm/dd/yyyy")
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
Hi Nick:
I need to used GetDate() in a query that Access does not support it.I don't use VB.I use C#.
Anyway thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
The previous CPian gave you the correct answer. The equivalent function for getDate() in MsAccess is Now(). It will work in both an isert query and as the default value for a date/time field: "INSERT INTO MyTable( Mydate) SELECT Now() AS Expr1"
or
"INSERT INTO MyTable( Mydate) Values( Now())"
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
Oh,I got it. Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
When binding a datagrid, one of the columns calls a function to process the "Status" field. However, sometimes that field is not there - sometimes I get the exception "Status is neither a DataColumn nor a DataRelation for table ABC".
So I used an IF statement to check if that field is Nothing, but that too caused the exception to be thrown.
How do I determine if a datarow contains a particular column?
|
|
|
|
|
Never mind. I discovered the Contains function on DataRow.Table.Columns .
|
|
|
|
|
|
I'm creating a contract database that has over 80 different calculations and formulas. I'm using one table with fields and one query for formulas. I need to run/update query through the browser. Does anyone have any idea how this should be done? I'm using this SQL statement in the query, maybe there is a better SQL statement I can use to automatically update my fields in the table? Please help!
I appreciate any help from you guys.
|
|
|
|
|
|
1. I have an application (SDI) which works with database
that is, retrieves data and the data are displayed in Edit Boxes and Statics
I want to send these data to another program, MS Word in my case
how to do this ?
2. Is it possible with ADO?
thank you.
|
|
|
|
|
You ought to use WinWord's COM API, e.g. create a new Word document, insert a table, and fill it in with the data from your database.
Alexandre Kojevnikov
MCP (SQL2K)
Leuven, Belgium
|
|
|
|
|
I want to count the number of records.... and display it in my web-page using my ASp page. I know that the "Select count(*) from table" will give the count in the database.
How can I retrive the 'result' from that query and pass it on to my ASP page??
Any help?
I was born intelligent Education ruined me!.
|
|
|
|
|
Off the top of my head it goes something like this (there might be some mistakes since I haven't tested it):
<script language=vbscript runat=server>
Dim ADOConn
Dim ADORs
Dim RecordCount
set ADOConn = CreateObject("ADODB.Connection")
ADOConn.Open(myConnectionString)
set ADORs = ADOConn.Execute("select count(*) as NumRecords from MyTable")
if not ADORs.BOF and not ADORs.EOF then
RecordCount = ADORs.Fields("NumRecords").Value
end if
ADORs.Close
ADOConn.Close
Response.Write "# Records: " & RecordCount
</script>
|
|
|
|
|
The fact that you're using a <script runat="server"> tag says that you're using .NET.
Therefore:
1. Use .NET the proper way with code behinds and a literal control
2. Use .NET the proper way with ADO.NET rather than ADO and late binding
Those are where your problems lie - your using legacy code in a new environment.
If you use ADO.NET, to get your record count just go get the value of myDataset.Tables(0).Rows.Count .
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
Actually, you're wrong there.
The <script runat="server"> tag was there long before .NET was developed. It's how script is run server-side in ASP.
Tatham wrote:
Those are where your problems lie - your using legacy code in a new environment.
Since the grandparent post asked for "ASP" and not "ASP.NET", I answered using VBScript which is the de-facto standard for using server side scripting in ASP.
Not everyone is using .NET yet.
|
|
|
|
|
I just installed SQL Server on my machine, and found that it was
really slow! I even had to wait for quite a while when
create a table or open an empty table in the Enterrpise
Manager. Accessing it from a program is also painfully
slow. I got SQL Server SP2 installed as well, but didn't
solve the problem. Any ideas?
Thanks a lot!
Wenrich
|
|
|
|
|
What machine/spec are you running it on? Memory, OS, Clock-Speed, Harddisk ( fragmentation) all plays a part on the overall speed.
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|