|
No worries - I just got in and online, but I'm glad you found a solution
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Object reference not set to an instance of an object.
Dim MyConn As New SqlConnection(ConfigurationManager.ConnectionStrings("psmConnectionString").ConnectionString)
how to solve it?
|
|
|
|
|
Well, at a guess you need to add psmConnectionString to your config file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i did put it on the config file.this is the line:
appSettings
add key="psmConnectionString" value="Provider=.NET Framework Data Provider for SQL Server:Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True" appSettings
is it rite?
-- modified at 2:49 Thursday 23rd February, 2006
|
|
|
|
|
>>Dim MyConn As New SqlConnection(ConfigurationManager.ConnectionStrings("psmConnectionString").ConnectionString)
What makes you think that the psmConnectionString item in the config manager will have a connection string property ? Why is it in the ConnectionStrings collection ? I didn't know there was such a thing, but assuming that there is, I'd assume that you need to do something specific to get your config item to appear there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You have put the value in the appSettings section and try to access it in the connectionStrings section. Either move it to the connectionstrings, or access it using the AppSettings collection.
---
b { font-weight: normal; }
|
|
|
|
|
when i used the conMyData = New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString")) it has an error.the error is The ConnectionString property has not been initialized. the program stop at Myconn.open().
anything can i do??
|
|
|
|
|
You have a colon instead of a semicolon between the two first properties in the connection string.
---
b { font-weight: normal; }
|
|
|
|
|
Dear All,,
Can U Help me to Generate the XML document from Excel Worksheet by Using Macro and VBA facility...Excel 2003 professional Edition have an option like XML in Data Menu..I have Excel 2003 Standard Edition...
Please Help me to get the Solution
Thanks n Regards,
Ramya.R
|
|
|
|
|
Sub SaveAsXML()
ActiveWorkbook.SaveAs Filename:= "C:\Book3.xml", FileFormat:= _
xlXMLSpreadsheet, ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
If you are trying to save the workbook that contains the macro, you will get a message about not being able to save the vbproject, but I assume the Macro will not be in the workbook you are saving as XML?
|
|
|
|
|
Dear Richard
Thanks For your Reply.
Actually that Worksheet is in .xls format.
I need to Write a Macro that Take the Column value from the Excel Sheet and Generate the Xml File From the particular field...
Thanks n Regards,
Ramya.R
-- modified at 6:36 Thursday 23rd February, 2006
|
|
|
|
|
Hi
What do you want to do with the XML file?
You can write 'text' to a file, in the following format:
<?xml version="1.0" encoding="utf-8"?>
<Sheet1>
<add key="CellA1" value="9.8205" />
<add key="CellA2" value="1473" />
</Sheet1>
You can test this by taking the above, pasting it into notepad, save it. Then change the extension from txt to xml. Then try opening it with the application that requires the file.
You'd have to look at the VBA help to see how to do the FileIO though. (Can help you with VB.Net code only, not VBA ->> Sorry)
|
|
|
|
|
Thanks alot Richard.........
Im new to Xml,Excel and VBA.Your Code Works Fine..
Once again thanks For yor Help....
Thanks n Regards,
Ramya.R
|
|
|
|
|
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code is Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;".vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.How do i solve this problem.Reply me soon plz
vijay.
Learn Lot
|
|
|
|
|
Hey, posting the same message three times won't get you an answer any sooner!
Have you looked up the error? What does it say? (Hint: the driver may be incorrect or a wrong path to your MDB file
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
If ODBC is not working , try OLE DB to connect to Access . That is more easy to work .
Divya Rathi
|
|
|
|
|
Hi,
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code is Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;".vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.How do i solve this problem.Reply me soon plz
vijay.
Learn Lot
|
|
|
|
|
Hi,
I have a database in Access 2003 and i set the password for that database.And also connect the database in VB6.0. The code
Cn.open "Driver={Microsoft access Driver(*.mdb)};DBQ=c:\Sam.mdb;pwd=vijay;"
vijay is password of my database.But this code not working,
"couldn't find data source and no default driver specifed" this error occured.
How do i solve this problem.Reply me soon plz.
vijay.
Learn Lot
|
|
|
|
|
It could be because you've supplied a password, but no user ID.
Cn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Sam.mdb;Uid=Admin;Pwd=vijay;"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there..
Urgently i need your guys help out there. Now i am planning to create an application which deals with the bluetooth technology. I would like to know how can i use VB.NET 2005 to do my application and how can i establish the connection from the server to mobile phone which is integrated with bluetooth? Do i need Winsock (Windows Socket) to establish the connection? if yes, how can i do it with vb.net 2005?
Please help me here. i am really stuck with my project now
Thanks
Tillandran
|
|
|
|
|
I don't think much has changed since you last posed this question in January[^]
tillandran wrote: I would like to know how can i use VB.NET 2005 to do my application
It's just like any other dev environment really - if you know the .NET Framework? In any case, try the programmer's friend[^] for possible answers.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Please tell me you're still not planning on spamming people's phones while they're shopping, are you?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am generating datatable dynamically (at run time) and to diplay this table I am generating DataGrid dynamically. But how to Add those datagrid to the Form collection so that I can see the data all the datatable having. ( The contraints is number of Datatable is not fixed and each table can be having Different nmber of colomns so everything I am to do at run time. )
Please help
Thanks in advance.
here is a part of Code :
'********************************************************************
For intPSectionIdCount = 0 To arrParentSectionIds.Length - 1
Dim arrDataTableRows() As DataRow
intParentSectionId = arrParentSectionIds(intPSectionIdCount) '
'Get each parent section id
arrDataTableRows = dTAllParentSectionDetails.Select("TDetails_Section_Parent_Id=" & intParentSectionId.ToString()) ' Get the
details of the child of that parent section
dT(intPSectionIdCount)=ProcessDataTable(CovertToDatatable(arrDataTableRows))
'Convert the array of datarow --> datatable -->Report showing table
Dim dg As New System.Web.UI.WebControls.DataGrid
dg.DataSource = dT(intPSectionIdCount).DefaultView
dg.DataBind()
Next
'********************************************************************
Arindam D T
|
|
|
|
|
|
can every 1 give example?
im currently doin some study..is it possible store data using note pad?
data tat 1 wanna store(example)
i.d, name, .jpeg(picture file)
any resource, pls reply me....thanks!!!!
|
|
|
|