How To Fetch Or Store A BIGINT Using DbExpress And Delphi 2005

Jul 23, 2005

Since there is no native support for 64bit integers in dbExpress, it
is not trivial to fetch a BIGINT from SQL 2k.

If it is possible, how can a BIGINT be fetched using TParam or TField?

Any help appriciated

View 2 Replies


ADVERTISEMENT

Delphi 2007 And SQL 2005 Triggers

Feb 6, 2008

Hi, I would really appreciate some help on this one as I know nothing about triggers to be quite honest.

I'm trying to add a feature to my Delphi 2007 application to start a SQL package whenever a load button on my Delphi form is clicked. Assume I'll need SQL code to perform this.

Can anyone please assist in this matter - sample code will also be much appreciated. Thanks a million!

View 1 Replies View Related

Diff Datatypes Used Doubt Int And Bigint ........SQL SERVER 2005......Any Useful Links ??

Jun 12, 2007

 Hello Frdz,                I have doubt regarding the datatypes fields used in  SQL SERVER 2005.The value for bigint Int64 is 18The value of int Int32 is 9/10Now,if in int i write : 1234567890 (accepted)This gives error     :  9874565656 (not accepted..........why is it so      ???     )Why is it so ??I want to know the perfect size of all the datatypes used in SQLSERVER 2005.There are also smallint,tinyint.....What's the main difference with all of them ??Can anyone provide me the nice links which can explain me what m i asking in this post...Please help me....I want to know all the datatypes used differences...   

View 6 Replies View Related

Delphi And SQL7

Nov 18, 1998

Can anyone please help me on how to access SQL7 through Delphi 2 or greater?

Any help at all is appreciated

View 1 Replies View Related

Connecting To Sql From Delphi 5

Sep 20, 2006

I try to connect (locally) to SQLServer Express from Delphi5. On my developer computer, which has Windows XP, SQLServer 2000, VisualStudio2005 (and with that, SQLExpress 2005), it is no problem. However, when I transfer my program and the database to other computers with Windows 2000/WindowsServer2003 and a more recent standalone-version of SQLExpress, I get error messages like:

'Db-Library error 10004: No connection possible: SQL Server not available or not existing'

It does not matter which protocols I activate at the Server or whether the Server Browser service is running or not.

Does anybody have an idea how this might be fixed? Or whether it is a problem of the operating system?

View 3 Replies View Related

Connecting SQL Server With Delphi 7

Dec 6, 2004

Hi,
How can i connect to an sql server db file. I have the server's ip number.
I'm using Delphi 7.
Thanks...
:)

View 2 Replies View Related

SQL + File Storage + Delphi

May 19, 2008

I am using Delphi 7 and need to save mulitple documents that range from 2K KB to 200K KB. These need to be stored in the database for inclusion in the database backup.

When i am working on the 200K KB file i continusely run out of memory, how can i resolve this.

View 1 Replies View Related

SQL 6.5 With Delphi 1.0 On Win95 Problem.

Jul 20, 2005

Hello,I have a situation where I have to run a Delphi 1.0 application onWin95 via ODBC to MS-SQL 6.5 server. This is working for me onseveral workstations.I always install 16-bit BDE and make appropriate changes to odbc*.INIfiles, etc.I have a machine which has just now been setup for this situation -and at the same time converted to a wireless network card.Everything works great as far as network connection, running querys,etc. But when get to the point of saving a transaction - I am gettingthe message:"Error - EDBEngineError(General SQL error. [Microsoft]{ODBC SQL ServerDriver][SQL Server]Line 2: Incorrect syntax near 'DATE_TIME')Here is the sql statement and partial source code:sql.Add('INSERT INTO INVOICES (INVOICE_NO, TOTAL, TAX, VOID_CODE,TYPE_CODE,');SQL.Add('invoices."DATE_TIME", TERM_NUMB, USER_NUMB, CUSTOMERID,BATCH)');SQL.Add('VALUES (:xINVOICE_NO, :xTOTAL, :xTAX, :xVOID_CODE,:xTYPE_CODE,');SQL.Add(':xDATE_TIME,'+':xTERM_NUMB, :xUSER_NUMB, :xCustomerID,:xBATCH)');ParamByName('xINVOICE_NO').AsString := InvoiceTotals.InvoiceNumber;ParamByName('xTOTAL').AsFloat := InvoiceTotals.Total;ParamByName('xTAX').AsFloat := InvoiceTotals.Tax;ParamByName('xVOID_CODE').AsString := vcFinalized;ParamByName('xTYPE_CODE').AsString := InvoiceTotals.TypeCode;ParamByName('xDATE_TIME').AsDateTime := InvoiceTotals.DateTime;ParamByName('xTERM_NUMB').AsInteger :=FUseStation;{InvoiceTotals.StationNumb;}ParamByName('xUSER_NUMB').AsInteger := InvoiceTotals.UserNumb;ParamByName('xCUSTOMERID').AsString := InvoiceTotals.CustomerID;ParamByName('xBATCH').AsString := DateToFieldStr(FUseBatch);ExecSQL;I realize DATE_TIME is some sort of reserved word but in this context(ie. table name and quotes) it works on all other stations. This isthe first part of a two part SQL transaction.What could be wrong?Thanks - Scott Murray.

View 3 Replies View Related

Using SQL Server CE In A NON .NET Delphi Application

Jan 23, 2007

Hi,

I'm looking at using SQL Server CE as a replacement for MS Access in a WIN32 Delphi Application. This limits my database options to Providers that is usable from ADO.

I see that the OLE DB Interfaces are implemented, but I can't connect to a SQL Server CE database from Delphi. I've cut and paste a sample connection string (replacing the data source bit) but no go??

I've installed the Runtime Environment, VS2005 bit, Connectivity Tools and the SDK :)

Any help? Anything that I might have missed?

Thanks,

Dawid

View 17 Replies View Related

SQL Server With Delphi - Multiple Tables

Jul 13, 1998

I have a Client/Server app built with SQL Server + Delphi as Front-end.
I have maybe 15 TTable components (active tables in the app.) and when runnning the app, each table uses 1 connection to the server. I had to boost the # of user connections from 15 to 25 just to run 1 instance of the app.
If i try running another instance of the prog. the server needs 15 x 2 connections. I`m wondering if this is NORMAL? Would it be possible to have only one connection per instance instead of 15 !?!

Thanks in advance

View 5 Replies View Related

Importing Tables By A Delphi Application

Oct 29, 2001

Hi everyone,

I'm making an application in Delphi that use an SQL database, i want the user can import a table in DBF format (that its located in another computer) to the SQL Server (in the database that i want) by one click of a button.

I try with the import wizard but its not what i want because it requiere to do the process manually.
Its there anyway of achive this (Stored Procedure or something?)

Ernesto Cisneros Sanchez
Senior Software Engineer
Credit and Trade Bank
Havana, Cuba

View 1 Replies View Related

Can SQL Server DTS Package Be Access Thru Delphi?

Mar 23, 2004

I have defined a Data Transformation Services (DTS) package in MS SQL Server. In VB I know that the DTS execution can be done thru VB codings. But what about Delphi?

Can anybody suggest any Delphi components or codings for this purpose.

Thannks in advance.

View 3 Replies View Related

MSSQLServer Express And Delphi Application

Jan 25, 2007

Dear friends I have a problem with the use of DELPHI and MSSQLServer!


I have installed in a PC a MSSQLServer Express. The PC is connected
with a other via a small network. I have developed an application in DELPHI
which runs also in the two computers. I have regulated SQLServer so as
to is accessible via TCP/IP, make that I tryed after in the other PC I
installed SQL Server Management Studio Express and had access in the
database via the network. While in the beginning both applications
worked normaly and were connected regularly in the base suddenly
one day they couldn't be connected giving as message the following
"DataBase Server Error: SQL State: 08001, SQL Error Code: 17 ", as there was no server. That is to say without I have teased the
properties the access to DataBase was impossible via the application but possible via the SQL
Server Management Studio Express and the environment of Borland Delphi
2005 from both PC's. That is to say
suddenly only the application simply could not be connected. I tryed
a lot of solutions but no one it did not work. When I installed the
MSSQLServer Express in the other PC the application could be connected
from this but no from the other via network always giving the same
message. Has anyone any idea why I am in impasse from solutions!!!!

Thak you in advance!

View 2 Replies View Related

Connect Delphi 2006 To MS SQL Express

Mar 23, 2006

I use Delphi 2006 to connect MS SQL Express 2005. When I save record, it shows the following error message:

Database Server Error : Cannot create new transaction because capacity was exceeded.

Does anyone know what happen and how to solve?

Thanks!

View 1 Replies View Related

Import Data From A Text File With DELPHI Toward Sql Server

Aug 10, 2004

Hello,

Is there a way to import data from a text file with DELPHI toward a SQL Server table.

I heard about BCP ...?

Does someone know?


THANKS.

View 5 Replies View Related

Problems With MOD-Function By Accessing MS-Access Database Via SQL In Delphi

Aug 23, 2005

Hello,the following problem:I use Delphi 6 to access a MS Access Database.In short, the Delphi Code looks like this:ADOConnection1.Open;ADOQuery1.Close;ADOQuery1.SQL.Text := 'SELECT * FROM database1 WHEREvalue1=1 AND value2= ' + inttostr(array[3]);ADOQuery1.Open;Label5.Caption:=ADOQuery1.Fiel*dByName('value4').A sString;Now I only want to select these rows, where the Integer value3 ends on1. So I need the Modulo-Function. I found in the Internet these twofunctions:MOD(x,y) und x % yBut I get an error if I want to use one.For example, If I changeADOQuery1.SQL.Text := 'SELECT * FROM database1 WHEREvalue1=1 AND value2= ' + inttostr(array[3])+' AND MOD(value3,10) = 1;Delphi shows me a Syntax Error in this statement.Thx for help!

View 2 Replies View Related

To Bigint, Or Not To Bigint?

May 27, 2008

 Hey, quick question here. In my database for my webapp (The one I showed you guys in my previous post), in my stickies table, I am using a column called StickyId for the PK, and it is of type int. My concern is that eventually, I may get to a point with more then 2 million records in the stickies field. I am looking at using the bigint datatype for StickyId instead, but it takes up twice the memory. So I have two questions:1. Can I declare the StickyId column as type int for now, and if my DB ever starts approaching the 2 million mark, access my DB and change it over to a bigint type? Aka, will MS SQL convert the exisiting int values into a bigint and be transparent to the app and the users?2. Does the bigint always use 8 bytes to store its value? Aka does it pad, so that if I stored the value of '1' would that take the same space as if I stored the value '43563636'? Or is it more like varchar, only taking up the space that that particular value needs?Thanks in advance guys!

View 3 Replies View Related

Bigint

Mar 18, 2008

Hi there! My question is: I use a bigint data type as a primary key in my database, so
1. Can I define bigint autoincrement as unsigned?
2. In case of possible, what type should I use in C# code that equal to bigint unsigned - ulong?
3. In case of impossible, what type should I use in C# code - long?
Thanks

View 7 Replies View Related

Bigint Field Vs Int

Sep 23, 2007

i am creating an application which the number of records will be beyond 100000 so i need to set the primary keys to bigint instead of int
i need to know about the performance and difference
will it affect the performance much and second will i have to change any code like delete,update

View 3 Replies View Related

Convert INT To BIGINT

Apr 11, 2006

Hi guys

View 19 Replies View Related

Bigint Datatype

Mar 10, 2008

I am using bigint as a primary key. What happens when bigint reaches the maximum number that it can hold?

The Yak Village Idiot

View 8 Replies View Related

Varchar To Bigint

Jan 2, 2008


I want to write the following query.


SELECT CASE WHEN Member.CuApplicationDocFK = 'NULL' THEN 'Existing' ELSE 'New' END AS MemberType
FROM Member


But the problem is Member.CuApplicationDocFK is bigint type. When I run the query it gives a error message saying "error converting data type varchar to bigint.

Can anyone tell me how to fix this please?

Thanks

View 5 Replies View Related

Bigint As Unsigned Value?

Oct 4, 2006

The documentation seems to suggest that I can store either a signed or unsigned value in bigint. If I want to store an unsigned value how do I go about it?

View 2 Replies View Related

Convert To BigInt

May 20, 2008



This select qry runs for abt 20 mins, I think convert to bigint is causing the slowness. Underlying tbl has abt 50000 recs. Pl note that I am runnign this in SQL SERVER 2005, Where it takes abt 20 mins. However when I run this on SQL Server 2000, it takes only 4 mins.


ANy ideas to speed up this qry.

select distinct convert(bigint,c.loannum) as loannum ,c.ampsstatus ,((convert(char(10),c.insdate,110) )) as MaxInsdate
from Conversion_AllStatus_History2007 c
where ((convert(char(10),c.insdate,110) )) =(select max((convert(char(10),a.insdate,110) )) from
Conversion_AllStatus_History2007 a
where convert(bigint,a.loannum)=convert(bigint,c.loannum))

View 3 Replies View Related

How Do I Store An XmlDocument In SQL Server 2005

Oct 23, 2006

Hi, I have  xmldocument type that stores xml data. I would like to able to store that data in sql server 2005 as a xml data type. How can I accomplish this using ado sqlcommand? XmlDocument xdoc = new XmlDocument();SqlConnection conn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["Test"].ConnectionString);conn.Open();SqlCommand cmd = new SqlCommand(); cmd.Connection = conn;cmd.CommandType = CommandType.StoredProcedure;cmd.CommandText = "spStoreApp";cmd.Parameters.AddWithValue("@PersId", "222-22-2222");cmd.Parameters.AddWithValue("@AppData", xdoc);try{cmd.ExecuteNonQuery();Response.Write("Storage of application successful");}catch (SqlException sqlx){Response.Write(sqlx.Message);}conn.Close();thanks in advance.

View 3 Replies View Related

Store Procedure In Sql Server 2005 & Asp.net

Feb 13, 2007

I want to tutorials which guide practice store procedure in sql server 2005 & asp.net with beginner level.
Any one know ?
Thank you very much.

View 1 Replies View Related

How To Store Video In Sql Server 2005

Feb 24, 2007

Dear sir or Madam

Can sql server 2005 can store video? because I dont want to store video path in database


I look forward to hearing from you
Thank you in advance.

seyha moth

View 1 Replies View Related

Store FILES In SQL Express 2005 With VB.NET

Feb 8, 2007



Hi, I'm a beginner with VB.NET and SQL and I would like to store files (like Images, Document...) in a Table of SQL but I have no idea how to do it.

This is my connection string, and examples of how I do queries, please help me...



Private cn As New SqlClient.SqlConnection

Private cn2 As New SqlClient.SqlCommand

cn.ConnectionString = stringa

cn.Open()

cn2 .Connection = cncn2

CommandType = CommandType.Text



Dim ESEGUI As String

cn2 .CommandText = "INSERT INTO users (nickname) values ('Paolo')

ESEGUI = cn2 .ExecuteNonQuery()



Dim oDr As SqlClient.SqlDataReader

cn2 .CommandText = "SELECT * FROM users WHERE Nickname like 'Paolo'"

oDr = cn2 .ExecuteReader



Thanks

View 1 Replies View Related

How To Store An MS Word Doc In A Sql 2005 Table

Aug 13, 2006

Hello,

I want to store the contents of an MS Word document (or a brief Word extract) in a database field. This document could contain carriage returns, boldface, etc. I have tried storing the Word doc in fields of type nchar, text, and sql_variant but they do not keep the Word formatting. I found that the "Extended Properties" attribute of a field seems to retain these properties. (Though if I recall right, Extended Properties has a length limitation and is a pain in the #*&_*^! to access)

What is the "right" way to do what I'm trying? Keep in mind that we may want to view this document under either "Query Analyzer" or print a hardcopy version. And we'd like both to be intelligible!

TIA,



Barkingdog

View 5 Replies View Related

Import A Store Xml File Which Has Dtd Into Sql 2005

Jan 22, 2008

I am trying to import a store xml file which has dtd into sql. The file is 97,211 kb. I want to get the data and columns into sql 2005. So far I have tried this:


DECLARE @xml XML;

use yahoostore

CREATE TABLE Products(xmlCol XML)

INSERT INTO Products(XmlCol)

SELECT

CONVERT(XML, BulkColumn, 2)

FROM OPENROWSET (BULK 'C:databasexmldtdyahoostore.xml', SINGLE_BLOB)AS X

This creates the table and only one column which takes a while to open, but I do not see anything in it.

Could someone please help with this problem. I have used openrowset and openxml and I am getting no where.

Thanks
Dee

View 38 Replies View Related

Bigint Type Primary Key

Jun 19, 2006

I'm using Sql Server 2000/7 for my projects.

How to handle the situation if a primary key (a field set as identity) of type bigint gives an overflow problem?

Is there any way to reuse identities if a primary key field is set as identity from the database settings? (we can do this if we donot set the primary key field as identity from the datbase and handle it from front end)

please help

View 1 Replies View Related

How To Convert Bigint To Timestamp

Mar 23, 2012

I am new SQL Server, I have below Timestamp conversion running in Oracle how do I convert same in SQL Server

Default date - 01/01/1970
Application stores Date as bigint - 1326310811062

(TIMESTAMP('01/01/1970', '00:00:00') + (1326310811062 / 1000) SECONDS) AS CREATION

View 7 Replies View Related

Bigint Autoincrement Question

Apr 15, 2004

Hi All,

i wonder if i can get an bigint autoincrement field where the number begins with the current year + 1 autonumber

Does someone know if it is possible and if yes, how?

Already thanx.
Cheers Wim

View 10 Replies View Related







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