Access Database Datatypes, ADOX And VS2005 Question
Jun 28, 2007
I'm using ADOX 2.8 for table creation: The following is an example of a column defintion:
If CreateNewTable Then CreateNewTable = a.CreateColumn("ReferenceCount", ADOX.DataTypeEnum.adInteger)
If CreateNewTable Then CreateNewTable = a.CreateColumn("Document", ADOX.DataTypeEnum.adLongVarBinary) 'Oleobject
If CreateNewTable Then CreateNewTable = a.CreateColumn("EntityID", ADOX.DataTypeEnum.adWChar, 18) 'text
Where CreateColumn looks like this:
Public Function CreateColumn(ByVal ColumnName As String, ByVal Datatype As ADOX.DataTypeEnum, Optional ByVal Size As Integer = 0) As Boolean
'ADOX.CreateColumn - Called by Common.CreateNewTable
'CreateColumn creates a column described in the Table object so it assumes it is set.
'One method of setting it is to call Select Table after opening the database
If Not Me.ConnectionIsOpen Then
MsgBox("CreateColumn - Failed to Create Column : " _
& ColumnName, MsgBoxStyle.Exclamation, cNoConn)
Return False
End If
Dim col As New ADOX.Column
col.Name = ColumnName
Try
col.Type = Datatype
Catch e As Exception
MsgBox("CreateColumb - Failed to Create Column : " _
& ColumnName, MsgBoxStyle.Exclamation, e.Message)
col = Nothing
Return False
End Try
If Size <> 0 Then col.DefinedSize = Size
Try
Table.Columns.Append(ColumnName, Datatype)
Catch e As Exception
If Err.Number() <> 0 Then
MsgBox(Err.Source & "-->" & Err.Description, , "Error")
End If
MsgBox("CreateColumb - Failed to Append Column : " _
& ColumnName, MsgBoxStyle.Exclamation, e.Message)
Return False
End Try
col = Nothing
Return True
End Function
in CreateColumn("EntityID", ADOX.DataTypeEnum.adWChar, 18)
the 18 specifies the field width in the database. Yet no matter whether I use adWChar or
adVarWChar, Access always shows the field size to be 255.
Does anyone know why or how to fix that?
View 1 Replies
ADVERTISEMENT
Jan 15, 2008
Hi all,
I have been pulling my hair trying to figure out what the guys at microsoft were thinking when creating the ADOX library. I have an access table that is syncronized with a SQL server. The table has a primary key with two columns [User] and [Program]. The SQL Server has both columns in as the primary key columns and I have a syncronization mechanism that is responsible for several things, one of which is to recreate the Access data structure. All works well for all tables except this one. I have tried to create the multi-column key in several ways, none that worked. Let me show you what I am doing:
CatalogClass catDCDLocal;
Column c;
catDCDLocal = new CatalogClass();
catDCDLocal.let_ActiveConnection(dbAccess.buildConnectionString(Settings.CattDCDLocalPath, Settings.SecurityDBPath, s.UserID, s.Password));
foreach (Table tbl in catDCDLocal.Tables) {
if (tbl.Name == "Users") {
/* This is retarded so need to clean up... Users table has a primary key consisting of 2 columns */
for (int i = tbl.Keys.Count - 1; i >= 0; i--) { //remove the keys
tbl.Keys.Delete(i);
}
for (int i = tbl.Indexes.Count - 1; i >= 0; i--) { //remove the indexes
tbl.Indexes.Delete(i);
}
tbl.Keys.Append("PrimaryKey", KeyTypeEnum.adKeyUnique, "User", "", "");
tbl.Keys[0].Columns.Append("Program", DataTypeEnum.adWChar, 6);
}
}
I have also tried:
tbl.Keys.Append("PrimaryKey", KeyTypeEnum.adKeyUnique, "User", "", "");
//tbl.Keys[0].Columns.Append("Program", DataTypeEnum.adWChar, 6);
Key k = tbl.Keys[0];
Column col = tbl.Columns["Program"];
//col.ParentCatalog = catDCDLocal;
k.Columns.Append(col, DataTypeEnum.adWChar, 6);
Nothing works for me ;-(
View 18 Replies
View Related
Oct 29, 2007
I need to programatically create a mdb file which will contain nullable columns. I am using C++ with ADOX for the table creation and ADO to perform the table update.
Although ADOX seems to create the table ok, Table->Columns->Appends does not set the fields as adColNullable as expected.
When I insert data using ADO::Recordset->AddNew the following error occurs :- "The field 'MyTable.Column 2' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field."
Am I on the right tracks here or do I need to adopt a different approach?
Code block to illustrate the problem :-
Code Block
ADOX::_CatalogPtr m_pCatalog;
ADOX::_TablePtr m_pTable;
ADOX::_ColumnPtr m_pCol1;
ADOX::_ColumnPtr m_pCol2;
ADODB::_ConnectionPtr m_pConn;
ADODB::_RecordsetPtr m_pRs;
//ADOX - Create Data Source
_bstr_t strcnn(("Provider='Microsoft.JET.OLEDB.4.0';Data source = C:\test.mdb"));
m_pCatalog.CreateInstance(__uuidof (ADOX::Catalog));
m_pCatalog->Create(strcnn);
m_pTable.CreateInstance(__uuidof(ADOX::Table));
m_pTable->PutName("MyTable");
m_pCol1.CreateInstance(__uuidof(ADOX::Column));
m_pCol1->Name = "Column 1";
m_pCol1->Type = ADOX::adVarWChar;
m_pCol1->DefinedSize = 24;
m_pCol1->Attributes = ADOX::adColNullable;
m_pTable->Columns->Append(m_pCol1->Name, ADOX::adVarWChar, 24);
m_pCol2.CreateInstance(__uuidof(ADOX::Column));
m_pCol2->Name = "Column 2";
m_pCol2->Type = ADOX::adVarWChar;
m_pCol2->DefinedSize = 24;
m_pCol2->Attributes = ADOX::adColNullable;
m_pTable->Columns->Append(m_pCol2->Name, ADOX::adVarWChar, 24);
m_pCatalog->Tables->Append(_variant_t((IDispatch *)m_pTable));
//ADO - Data Access
m_pConn.CreateInstance (__uuidof(ADODB::Connection));
m_pConn->Open(strcnn,_bstr_t(""),_bstr_t(""),ADODB::adOpenUnspecified);
m_pRs.CreateInstance(__uuidof(ADODB::Recordset));
m_pRs->Open("MyTable", _variant_t((IDispatch *)m_pConn,true),ADODB::adOpenKeyset, ADODB::adLockOptimistic, ADODB::adCmdTable);
// Define a SafeArray that contains field names.
SAFEARRAY * psaFields;
SAFEARRAYBOUND aDimFields[1];
aDimFields[0].lLbound = 0;
aDimFields[0].cElements = 1;
psaFields = SafeArrayCreate(VT_VARIANT, 1, aDimFields);
// Create a SafeArray for values.
SAFEARRAY * psaValues;
SAFEARRAYBOUND aDimValues[1];
aDimValues[0].lLbound = 0;
aDimValues[0].cElements = 1;
psaValues = SafeArrayCreate(VT_VARIANT, 1, aDimValues);
long ix[1];
_variant_t var;
//Insert Data
ix[0] = 0;
var = "Column 1";
SafeArrayPutElement(psaFields, ix, (void*) (VARIANT *) (&var));
ix[0] = 0;
var = "test data row 1 col 1 Only";
SafeArrayPutElement(psaValues, ix, (void*)(VARIANT *) &var);
_variant_t vtFields, vtValues;
vtFields.vt = VT_ARRAY | VT_VARIANT;
vtValues.vt = VT_ARRAY | VT_VARIANT;
vtFields.parray = psaFields;
vtValues.parray = psaValues;
m_pRs->AddNew(vtFields, vtValues); //!! Fails Here !!
m_pRs->Update();
m_pRs->Close();
m_pConn->Close();
View 3 Replies
View Related
Jul 20, 2007
I am developing a C# mobile 5.0SDK app that utilizes SQL2005 Compact Edition device files on Vista using as far as I know the latest SPs and versions.
Last night, I could open tables from the Server Explorer .sdf file, see the contents, edit the schema, etc. Now today, I assume all of a sudden,I am able to open schema but cannot open the table to see the contents. I get:
Microsoft SQL Server 2005 Compact Edition captioned error dialog box that says "Access to the database file is not allowed. [ File name = ],[,,]
Using Sql Server 2005 Management Studio Express, I can open the table, do queries etc. I have tried rebooting, deleting, opening old projects, deleting dataset, disconnecting mobile device, but I still get the same error. I have tried stopping the SQL Server(SQLEXPRESS) service on the server but get:
Cannot open MSSLQ$SQLEXPRESS service on computer 'p5w64'. Access is denied.
I have no idea what to do next to start moving forward again, other than try the XP environment which I will do next.
Has anyone experienced this problem?
Thank you.
View 9 Replies
View Related
Jun 5, 2007
Hai,
I am using ADOX to create linked tables in a jet database from an ODBC datasource.
The tables in the ODBC data source does not have a primary key.
so I am only able to create read only linked tables.But I want to update the records also.
I tried adding a primary key column to the linked table while creating the link.
but I am getting an error while adding the table to the catalog.
The error message is "Invalid Argument".
I use the following code for creating the linked table
Sub CreateLinkedTable(ByVal strTargetDB As String, ByVal strProviderString As String, ByVal strSourceTbl As String, ByVal strLinkTblName As String)
Dim catDB As ADOX.Catalog
Dim tblLink As ADOX._Table
Dim ADOConnection As New ADODB.Connection
ADOConnection.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strTargetDB & ";User Id=admin;Password=;")
catDB = New ADOX.Catalog
catDB.ActiveConnection = ADOConnection
tblLink = New ADOX.Table
With tblLink
' Name the new Table and set its ParentCatalog property
' to the open Catalog to allow access to the Properties
' collection.
.Name = strLinkTblName
.ParentCatalog = catDB
' Set the properties to create the link.
Dim adoxPro As ADOX.Property
adoxPro = .Properties("Jet OLEDB:Create Link")
adoxPro.Value = True
adoxPro = .Properties("Jet OLEDB:Link Provider String")
adoxPro.Value = strProviderString
adoxPro = .Properties("Jet OLEDB:Remote Table Name")
adoxPro.Value = strSourceTbl
End With
'Adding primary key,
'***** the source column name is "Code" ******
tblLink.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "Code")
'Append the table to the Tables collection.
'******The exception occurs on the following line***********
catDB.Tables.Append(tblLink)
'Append the primary index to table.
catDB = Nothing
End Sub
If I avoid the line for adding the primary key,everything works fine,but the table ctreated is readonly.
Thanks in advance
Sudeep T S
View 4 Replies
View Related
Feb 20, 2007
Can SOmeone help me How to get access BIDS from VS2005 . SQL server is installed in different server other than VS 2005 PC
View 1 Replies
View Related
Dec 6, 2007
I have added alias datatypes using sp_addtype and would like to view the properties defined in it.
please let me knowhow to view the properties of them and also is there a way to list all alias datatypes existing in the current database along with their properties.
View 1 Replies
View Related
Jun 27, 2006
Dear all:
Is there a way to connect to a SQL Server mobile using native code C++?
I don't want to use the Compact Framework to access Data.
Does anybody knows how to connect to an SQLite database from VS2005 c++ for devices?
Thanks.
Alfredo Mendiola Loyola
Lima Perú
View 4 Replies
View Related
Dec 8, 2006
We€™re calling ADOX::Table::Keys::Append to make a primary key for a table using the SQLOLEDB provider. We€™re passing an ADOX::Key with Name set to a custom name, Type set to ADOX::adKeyPrimary, and a single column added. For the Append call, the 2nd parameter is ADOX::adKeyPrimary, the third is a vtMissing (VT_ERROR with DISP_E_PARAMNOTFOUND), the last two are empty BSTR€™s.
On XP, this works well (msadox.dll file version 2.81.1117.0). On Vista, this fails with an invalid parameter error (msadox.dll version 6.0.6000.16386).
Has the interface changed in some way, is this functionality not supported, or is it broken?
View 1 Replies
View Related
Jan 30, 2007
I need to rename tables in code VB2005 (access database). On the
forum I found post about ADOX and this code to rename the tables:
Private Sub RenameTables(ByVal sTextToRemove As String)
Dim i As Integer
Dim dbRename As Database
Dim Connect As New PrivDBEngine
dbRename = Connect.OpenDatabase(tbDBPath.Text)
dbRename.CreateTableDef()
For i = 0 To dbRename.TableDefs.Count - 1
If dbRename.TableDefs(i).Name.Length >= sTextToRemove.Length - 1 Then
If dbRename.TableDefs(i).Name.Substring(0, 9) = sTextToRemove Then
dbRename.TableDefs(i).Name = dbRename.TableDefs(i).Name.Substring(9)
End If
End If
Next i
dbRename.Close()
dbRename = Nothing
MessageBox.Show("Tables in " + tbDBPath.Text + " have been renamed.
Rename Access Tables", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
But it doesn't work because i get an error on Dim dbRename As Database Dim Connect As New PrivDBEngine
What I need to do for this to work?
Thank you!
View 3 Replies
View Related
Apr 17, 2008
Hello,
I'm using Reporting Services to render a text (stored in sql as varchar(max)). The text is all plain text, with some lines having trailing spaces.
Source text file i've imported to SQL via SSIS:
CLIENT: 10055
STATEMENT 2007
DATE:1002993
THIS IS THE OTHER STATEMENT
COLUMN1 COLUMN2 COLUMN 3
TRY THIS
*Note the trailing spaces on the line before 'STATEMENT 2007'.
I've designed a report using the Report Project in VS2005 to retrieve this text via a stored procedure. When I test the report using the 'Preview' tab in the IDE, it looks good
CLIENT: 10055
STATEMENT 2007
DATE:1002993
THIS IS THE OTHER STATEMENT
COLUMN1 COLUMN2 COLUMN 3
TRY THIS
But when I deploy the report and run it using URL Access:
CLIENT: 10055
STATEMENT 2007
DATE:1002993
THIS IS THE OTHER STATEMENT
COLUMN1 COLUMN2 COLUMN 3
TRY THIS
On all lines with trailing spaces, they (the trailing spaces) have been removed. This is affecting my formatting of some reports and statements. We really want to use the report viewer as it has built in paging, print and export capabilities.
Why does it look okay in VS2005 but different in Report Viewer via URL Access and Report Manager?
Note: When I export as PDF, it looks okay.
The stored procedure I use to return the data is a CLR Hosted assembly as below:
Code Snippet
Partial Public Class StoredProcedures
<Microsoft.SqlServer.Server.SqlProcedure()> _
Public Shared Sub GetPagedDocument(ByVal inText As SqlString)
Dim dr As SqlDataReader
Dim row As New SqlDataRecord(New SqlMetaData("RowText", SqlDbType.Text))
Dim cmd As New SqlCommand("select cast(doc as varchar(max)) as 'DOCTEXT' from testdoc WHERE id='" + inText + "'")
Dim cn As New SqlConnection("context connection=true")
cn.Open()
cmd.Connection = cn
SqlContext.Pipe.SendResultsStart(row) 'initialise the resultset to be returned
dr = cmd.ExecuteReader
'If no records in result set, return.
If Not dr.HasRows Then
row.SetString(0, "There is no document to display or you do not have permission to view the document.")
SqlContext.Pipe.SendResultsRow(row)
SqlContext.Pipe.SendResultsEnd()
' SqlContext.Pipe.Send("There is no document to display.")
Return
End If
'Read rows in the result set
dr.Read()
'Get the entire text
Dim docText As String = dr.Item("DOCTEXT")
'debug
row.SetString(0, docText)
SqlContext.Pipe.SendResultsRow(row)
SqlContext.Pipe.SendResultsEnd()
Return
'end debug
End Sub
End Class
Any help will be appreciated.
View 3 Replies
View Related
Jul 19, 2007
Hi Everybody,
I want to add new column 'firstaname' into the existing table "geo" already two columns namely
'salcode' 'lastname'.I run the following code it runs without error, when i opened the database see the structure of table, i didn't find new column in the table "geo"
here is the snippet of code what i am using.
/* FieldsPtr fields;
FieldPtr field;*/
_bstr_t name("firstname1");
//pRstTitles->get_Fields(&fields);
/* pRstTitles->Fields->Append(name, adVarChar , 15, adFldUnspecified);
pRstTitles->CursorLocation = adUseClient ;
pRstTitles->LockType = adLockOptimistic ;
pRstTitles->Open("geo",
_variant_t((IDispatch *)pConnection,true), adOpenStatic,
adLockOptimistic, adCmdTable);*/
pls pls pls help me out .. I need it very urgently.
View 13 Replies
View Related
Apr 13, 2008
Just to verify that this was an issue, I downloaded web developer 2008 and I do not experience this same problem.
BUT when I go to add a dataset in vs2005 for an asp website - all my db files come up in the dialogue box but everyone that click (every db file) I get "This file is in use. Please enter a new name or close the file that's open in another program."
But, like I said, I downloaded 2008 and it does not occur. Plus I KNOW that the db's are not being used. Can someone give me a remedy to this?
View 1 Replies
View Related
Jan 22, 2008
my code:
Code Block
void AppendTableTest()
{
// Define ADOX object pointers, initialize pointers. These are in ADOX namespace.
_CatalogPtr m_pCatalog = NULL;
_TablePtr m_pTable = NULL;
try {
HRESULT hr = S_OK;
TESTHR(hr = m_pCatalog.CreateInstance(__uuidof(Catalog)));
// Open the catalog
m_pCatalog->PutActiveConnection("Provider='Microsoft.JET.OLEDB.4.0';data source='c:\new.mdb';");
//m_pCatalog->Tables->Delete("MyTable");
TESTHR(hr = m_pTable.CreateInstance(__uuidof(Table)));
m_pTable->PutName("MyTable");
m_pTable->Columns->Append("Column1",adInteger,0);
m_pTable->Columns->Append("Column2",(DataTypeEnum)21,8);
m_pTable->Columns->Append("colBinary",adBinary,8);
//m_pTable->Columns->Append("Column3",adVarWChar,50);
m_pCatalog->Tables->Append(_variant_t((IDispatch *)m_pTable));
printf("Table 'MyTable' is added.");
// Delete the table as this is a demonstration.
//m_pCatalog->Tables->Delete("MyTable");
printf("Table 'MyTable' is deleted.");
}
catch(_com_error &e) {
// Notify the user of errors if any.
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
TRACE(" Source : %s description : %s ", (LPCSTR)bstrSource, (LPCSTR)bstrDescription);
}
but i got a invalid type error. I cannot understand.
why adox can not append adUnsignedBigInt field ?
Somebody can give me a answer? Thanks.
View 1 Replies
View Related
Nov 26, 2007
Hi
I'm trying to add columns to an existing table using ADOX. I'm using C++/CLI. My code is as follow
Table->default->Append("new_column", ADOX:: DataTypeEnum::adWChar, 255);
Table->default["prev_instance_id"]->Properties["Jet OLEDB:Compressed UNICODE Strings"]->default = true;
The first line of code works fine but when I try to set the value of the property I get the following excpetion:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in MyDll.dll
Additional information: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Any idea?
Marco
View 7 Replies
View Related
Aug 17, 2000
We have been asked to look into using stored procedures with SQL Server 7.0 as a way to speed up a clients site. 99% of all the articles I have read along with all the books all say Stored Procedure should be used whenever possible as opposed to putting the SQL in your ASP script. However one of my colleagues has been speaking to Microsoft and they said that that they were surprised that our client wanted to use Stored Procedures as this was the old method of database access and that now he should really consider using COM objects for data access as itis much faster. Has anyone got any views on this or know of any good aticles regarding this matter ?
View 1 Replies
View Related
Jun 10, 2015
I have recently upgraded to SQL2014 on Win2012. The Access front end program works fine.
But, previously created Excel reports with built in MS Queries now fail with the above error for users with MS 2013. The queries still work for users still using MS 2007.Â
I also cannot create any new queries and get the same error message. If I log on as myself on the domain to another PC with 2007 installed it works fine, so I don't think it is anything to do with AD groups or permissions.
View 6 Replies
View Related
Mar 25, 2008
I need to determine the following about the current authenticated Windows domain user who is trying to access a SQL Server via a trusted connection.
1 Has the current user been granted login access to the trusted SQL Server?
2 Has the current user been granted access to a specific database?
3 Is the current user a member of a specific database role such as (DB_ROLE_ADMINISTRATORS)?
Thanks,
Sean
View 6 Replies
View Related
Feb 5, 2007
I developed a database with Access 2003 and everything was working good until my tech came in and reformated my hard drive and install a new Ghost image that met our company standards.
Now I cannot go in and make any changes to any of the tables, queries and forms. All of this started when a new Ghost image was installed on my pc.
The message I get when I try to open my database is "You do not have permission to run "tblSwitchboard." I get the same error message when I try to do anything at all on the database.
I am at a loss as to what to do. Please help.
View 1 Replies
View Related
Sep 13, 2000
I am designing my first SQL database and need some insight on datatypes.
What datatype is equivalent to autonumber like in MS Access.
When I convert an auto number field to to SQL it comes as int with a length of 4, Does this mean it will only auto increment to 9999?
I need the field to increment forever.
Also what datatypes should be used for phone number with area code and
zip code.
Thanks
View 1 Replies
View Related
Nov 20, 2000
Hi i'm using the FileSystemObject to loop through a file and read out all the data within it (it's an html page, so loads of tags and free text) and then put it in a field in a table. I am using the nText datatype but i don't think i use Full-Text Searching with this, is there any other i can use that produces the same result?
Cheers in advance...
View 3 Replies
View Related
Apr 10, 2002
Hello,
I'm 17 years old and I'm from Belgium, and I have to make a school project. I have to make a program in Visual Basic and my database is SQL Server 2000. I've already made my tables but I dont know excactly what all the datatypes in SQL Server are. They are a little bit different then Access datatypes and I dont know what to use, ntext, text, nvar, ... I can't find a list of the meaning of the datatypes on the net, maybe I'm searching with the wrong keywords(+"sql server" +datatypes in yahoo), but could please someone give me a link of a site where there is that kind of information?
thanks a lot :)
Dommie x
View 1 Replies
View Related
Aug 4, 2004
I'm new to SQLServer and I'm creating some tables. In Oracle I always used varchar as this was the default and also recommended. The default in SQLServer seems to be char. Am I right in thinking that varchar is still best to use, as the field can then be of variable length rather than fixed?
View 4 Replies
View Related
Aug 27, 2005
Could someone tell me the datatypes for the SQL EXPRESS 2005
I'm trying to use a boolean datatype and it says it isn't a datatype....have they changed it??? Please HELP!!!
Thanks
View 6 Replies
View Related
Apr 1, 2007
I have a SQL 2005 database that's created by a survey data collectionsystem. Users of this system are fairly non-technical and have littleto no conscious control over the datatypes. As a result, the data ismostly stored quite inefficiently as varchars. For example, there isdata that could be stored in a column of bits and it's stored as avarchar value of 0 or 1. (Yuck, I know.)I am building a reporting system using this raw data and have a newtable structure designed that is much more efficient (and better forreporting). Does anyone have any suggestions for getting this datainto my new structure? Specifically, how would you recommend checkingthat varchar field and determining it could be stored as a bit?
View 3 Replies
View Related
Sep 29, 2006
i hope this is the right board for this.
i want to have a table for members of a club/society and i wnt to be able to maintain the structure of their member id numbers, eg com212 for a committee member, or mem019 for ordinary members.
is there a way to automate this using some sort of auto-incriment function and use this as the primary key for the table?
thanks in advance,
mark
View 4 Replies
View Related
Apr 17, 2007
I have created a coldfusion webpage form that writes to a sql database. For comment boxes they can enter as much text as they need. Do I want to choose a varchar for my datatype and put a riduculously high number for characters or should I should use a text datatype and if I use text are there specific options I should set up?
Thanks!!!
View 4 Replies
View Related
Nov 18, 2006
I am currently creating a database tables in SQL Server 2005. I am looking for a link to a website that might explain to me the correct configuration for tabels in a sql server database such as the recommended datatypes for specific fields, eg datatype for short characters, or numbers etc.
View 3 Replies
View Related
Jun 3, 2007
Can some1 tell me the data types used in SQL Server for what like, i use Access so like i feel the data types are more intuitive, but for SQL Server in ASP, nchar, nvarchar, there are so many and i dunno what is what. any sites for beginners? cos i searched google and the terms they use to describe data types are like "variable length" "Unicode" i don't exactly know them. something like A-B, integers etc will be good.
View 2 Replies
View Related
Jun 9, 2000
Two datatype problems: (1) Datetime conversion (2) Foreign Currency format.
The first problem is that I am trying to convert source data from varchar to datetime. The source data is in CSV format and is displayed as follows - '1111999052349' to represent 1-Nov-1999 05:23:49. Have converted to a numeric value and then tried to convert to datetime but this just returns the following message 'Server: Msg 8115, Level 16, State 2, Line 3
Arithmetic overflow error converting expression to data type datetime.' However you can convert to a timestamp but the value returned is not meaningful (e.g. 0x0E0000013DFA4EE8).
Problem 2 concerns the French currency. The source data is in CSV format and is displayed as follows - '00000001,9700' to represent Fr1.97. Need to convert this to a numeric field or alternatively get SQL 7 to recognise it as a money field.
Any suggestions would be musch appreciated.
Many Thanks.
View 2 Replies
View Related
Feb 19, 2001
Hi,
Is anybody can tell me why I can't have more than 255 characters in a field with text datatype?
The insert and the retreive is done directly using ISQL...
Thanks a lot for your assistance
Patrick
View 2 Replies
View Related