|
I assume you've tried LTRIM()...
Tom Wright wrote: Could there be something else there and the system sees and is not reading it right?
Try this to find out:
select ASCII(SUBSTRING(dmv2_data_text, 40, 1)) AS AsciiCode<br />
from dmv2 WHERE DMV2_RCD_TYPE = 'R'
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
That did it. The correct code was a 10. Strange.
Thanks for the help
Tom Wright
tawright915@gmail.com
|
|
|
|
|
Glad it worked.
FYI:
13 = carriage return<br />
10 = line feed
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Eric, mind if I ask you another question.
I'm calling a SP like this from my code:
myConnection.Open();
SqlCommand myCommand = new SqlCommand("EXEC LA_SP_NYSPINRESPONSE '"+ recType +"', 'P', '"+ Encoding.UTF8.GetString(ByteBuffer, 0, ByteBuffer.Length) +"', " + TrackNumber, myConnection);
myCommand.Connection = myConnection;
myCommand.ExecuteNonQuery();
This works great however on one of repsonses that I'm writing out there is a single quote in the data, thus causing a problem when passing this data to my SP. It thinks it's end quote to a string. Would parameters be better, to pass data that way then to concante it like I'm doing?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
|
I've been trying to learn ADO.NET for a few weeks now. I know most of the components and what they do, but i'm not sure how they all work together. I'm trying to write a very simple app, but I'm not getting it to work. I have 4 tables (Customers, Orders, Products and OrderDetails). There are 3 relationships (Cust to Order, Order to Details and Prod to Details). I set up a windows for with 2 listbox's and a datagrid. I want to be able to populate the first listbox with the customers, click a customer and display their orders in the 2nd listbox. I've got my program this far. Now I want to click on an order and display the the order details (custID, OrderID, ProductID, ProductName, ProductQTY). I've looked online for tutorials and read through a couple of ebooks, but they mostly talk about 1 table or 2 tables max and maybe only 1 relation. Any help would be greatly appreciated.
|
|
|
|
|
Not sure what exactly is confusing you, but the principle is the same as it was for the firs pair of listboxes (you filled the second from orders using the custToOrder relation and the custId of the selected row in the first. Now fill the third from OderDetails using the OderToDetails relation and custId,OrderId from the selected row in the second...).
|
|
|
|
|
Hi all,
My application uses 2 different databases.
so rollback condition here very complex.
example.
1. insert into tableA ---DB1 (points db1)
2. insert into tableA ---DB2 (points db2)
if second qury fails i want to rollback with respective databases.
How can i do that?
|
|
|
|
|
Are you using .NET? If so you can append a transation object to the command for each database and roll back or commit using them. But I think MS has some sort of DTC which I know nothing about.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Look up BEGIN DISTRIBUTED TRANSACTION in SQL Server Books Online.
[edit]See here: clickety[^][/edit]
-- modified at 10:33 Friday 4th August, 2006
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Hi @all
I was looking around for a solution but i cant find anyone.
The point is, i want to make a list with the Tables inside of a specified mdb file.
Is there a way to read the table structure of an Access mdb?
Greetings
poOkie
|
|
|
|
|
You could take a look at ADOMD, this is a library that can be used to create new access databases or change the structure of existing access databases.
WM.
What about weapons of mass-construction?
|
|
|
|
|
If you are using .Net, the the GetOledbSchemaTable method of the database connection:
static DataTable GetSchemaTable(string connectionString)
{
using (OleDbConnection connection = new
OleDbConnection(connectionString))
{
connection.Open();
DataTable schemaTable = connection.GetOleDbSchemaTable(
OleDbSchemaGuid.Tables,
new object[] { null, null, null, "TABLE" });
return schemaTable;
}
}
If not, then see the ADOMD documentation, it provides a similar function.
|
|
|
|
|
how to create a database in connection base
santhosh
|
|
|
|
|
Can you rephrase that in English please
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Ed.Poore wrote: Can you rephrase that in English please
Thanks for the new sig material, Ed
Paul
That's no moon, it's a space station. - Obi-wan Kenobi
|
|
|
|
|
I should start charging you for these sigs , feels like I've got an amiable stalker
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Ed.Poore wrote: I should start charging you for these sigs
How have things been? Pop any critters lately with your air gun?
Christian Graus wrote: So your belief is based on the last thing you read online ? That's really sad...
|
|
|
|
|
|
Ed.Poore wrote: A few
Ed.Poore wrote: typical western shot where the body went tumbling backwards
I've taken a few pop shots at ground squirrels lately, but more ocean fishing than anything else
That's no moon, it's a space station. - Obi-wan Kenobi
|
|
|
|
|
SqlConnection conn = new SqlConnection("Server=bla;Initial catalog=bla;User Id=bla;Password=bla");<br />
OleDbConnection conn2 = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\bla.mdb");
Simple, check the documentation of the .NET framework for more samples
WM.
What about weapons of mass-construction?
|
|
|
|
|
Hi Friends,
While I am trying to connect to the database server I am getting the following error.
ERROR: 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I checked my web.config file. I didnt find any errors in this.
Please help me to solve this.
I am using VS 2005 and SQL Server 2000
Thank you
Jijo
JIJO BABY - Lets Play C#
|
|
|
|
|
How are you connecting, SQL based Authentication? (I.e. username and password), if so then SQL by default does not have this enabled, you'll need to open up the MMC snap-in for SQL and enable it. If the SQL Admin doesn't know how to do this then... Google
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi,
I'm trying to change the name of a column in an Access 2000 database (using C#). From my internet research, It looks like there is no sql RENAME for Access. I have come up with the code below, but please let me know if there is better sql code for this.
"ALTER TABLE Products ADD COLUMN NewColumn DECIMAL"
"UPDATE Products SET NewColumn = OldColumn"
thanks,
Ron
|
|
|
|
|
hi there i have this pro too.. i have a set of database in access format and i wish to change the name of my columns..how can i do it? do i need to change e codes written in visual studio?
|
|
|
|